Update document WIP.

This commit is contained in:
ArthurSonzogni
2020-05-25 01:34:13 +02:00
committed by Arthur Sonzogni
parent 177df31d41
commit 75c424cea9
55 changed files with 3244 additions and 152 deletions

View File

@@ -63,7 +63,8 @@ Element focus(Element child) {
class Frame : public Node {
public:
Frame(std::vector<Element> children, bool x_frame, bool y_frame) : Node(std::move(children)), x_frame_(x_frame), y_frame_(y_frame) {}
Frame(std::vector<Element> children, bool x_frame, bool y_frame)
: Node(std::move(children)), x_frame_(x_frame), y_frame_(y_frame) {}
void ComputeRequirement() override {
Node::ComputeRequirement();
@@ -109,6 +110,10 @@ class Frame : public Node {
bool y_frame_;
};
/// @brief Allow an element to be displayed inside a 'virtual' area. It size can
/// be larger than its container. In this case only a smaller portion is
/// displayed. The view is scrollable to make the focused element visible.
/// @seealso focus
Element frame(Element child) {
return std::make_shared<Frame>(unpack(std::move(child)), true, true);
}