Empirical
|
Manage an entire document. More...
#include "events.h"
#include "Button.h"
#include "Canvas.h"
#include "Div.h"
#include "FileInput.h"
#include "Image.h"
#include "Selector.h"
#include "Table.h"
#include "Text.h"
#include "TextArea.h"
#include "canvas_utils.h"
#include "color_map.h"
Go to the source code of this file.
Classes | |
class | emp::web::Document |
Namespaces | |
emp | |
If we are in emscripten, make sure to include the header. | |
emp::web | |
Manage an entire document.
The Document class is built off of Div, but initializes the EMP web framework, if neeeded, and activates itself. It also provides quick ways to add and lookup widgets.
For example, you can use doc.AddButon(...) to add a new button to the document, where the ... can be any of the mechanisms to build a new button. This technique works for any widget type.
You can also look up any widget by name. For example, if you previously created a Canvas widget with the HTML id "my_canvas", you can look it up later by using doc.Canvas("my_canvas")