Div.hpp
Div Widgets maintain an ordered collection of other widgets in an HTML div.
When printed to the web page, these internal widgets are presented in order.
To create a Div:
Div my_div(“name”);
To use a Div:
my_div << “Add this text!” << Image(“my_image.png”) << “<br>”;
To register a Div in a Document:
my_doc << my_div;
- Todo:
Should we move all widget_dict info into Document?
Note
Formerly called Slate.h
-
class Div : public internal::WidgetFacet<Div>
- #include <Div.hpp>
A widget to track a div in an HTML file, and all of its contents.
Subclassed by Card, CommentBox, ConfigPanel, Document, Element, Modal, ValueBox
Public Types
-
using INFO_TYPE = internal::DivInfo
Public Functions
-
inline ~Div()
-
inline double ScrollTop() const
Where is the top of the scroll region?
-
inline void Clear()
Clear the contents of this div.
-
inline void ClearChildren()
Remove all child widgets from this div.
-
inline bool HasChild(const Widget &test_child) const
Determine if a specified widget is internal to this one.
-
inline void Deactivate(bool top_level) override
Remove this widget from the current document.
-
inline Widget &Find(const std::string &test_name)
Get an internal widget to this div, by the specified name.
-
inline bool HasChild(const std::string &test_name) const
Determine if a specified widget is internal to this one.
-
using INFO_TYPE = internal::DivInfo