-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.txt
57 lines (35 loc) · 2.3 KB
/
README.txt
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
This is the witty plus version 2 library.
The witty-plus was not quite going the right way to be a library, and a lot of the auth stuff that it added was added in a better way in Wt itself.
It's a library that adds some less generic, but more immediately useful functionality to the witty library at http://webtoolkit.eu
It's licensed under the GPL2 so that you can link it with Wt.
Features:
* Gives a base app with a lot of stuff used in dbo apps already there.
* Provides simple virtual interfaces to speed up compile time, for example to get the dbSession:
# include <wp2/db.hpp>
Wt::Dbo::Session& db = wp2::db();
* Ties together common controls, such as a label and a form widget, gives a choice of layout methods. For example:
#include <wp2/FormHelper>
auto helper = FormHelper(MyContainerWidget or MyLayoutManager);
auto nameField = helper.addField<Wt::WComboBox>(tr("Name:"));
auto btnBar = helper.btnBar();
btnBar->OKHit().connect(this, &MyForm.saveChanges);
* Provides easier internal URLManagement
#include <wp2/iURLs>
auto urls = wp2::iURLs::instance();
urls->register("/page", [urls]() { showPage(urls->nextPart()) });
urls->register("/page/edit", [urls]() { editPage(urls->nextPart()); });
// Create an internal Path link
urls->anchor(tr("Go to next Page"), "/page/4", myForm);
* More stuff to go here as I think about it
Restrictions:
* Needs a c++11 compatiblish compiler like gcc4.7
* Make heavy use of virtual classes
Overview:
The source is organised in directories
bin - this directory contains binaries for setting up new witty app directories
wp2 - This is the library directory
static - This contains static files that wp2 needs such as css and images.
private - This contains private files that are not served on the web but needed by wp2, for example configuration files
How to use static:
When the library is compiled and installed, the static directory is installed in /usr/share/wp2/static. When your write your app, it's best if you either symlink it or copy it to a directory called wp2. Then when you launch your app, include it in the command line --docroot argument. For example --docroot=".;/wp2,/images,/style" where images and style are your
It's installed into /usr/share/wp2/static. When you include it in your app,