sanette / bogue-tutorials Goto Github PK
View Code? Open in Web Editor NEWA collection of tutorials for the OCaml Bogue library
Home Page: https://sanette.github.io/bogue-tutorials/bogue-tutorials/index.html
License: Other
A collection of tutorials for the OCaml Bogue library
Home Page: https://sanette.github.io/bogue-tutorials/bogue-tutorials/index.html
License: Other
Hi,
Looking through the hello world example, and pretending for a moment that I haven't yet read the docs or API for bogue, looking at just the contents of the tutorial a few questions would arise:
Proposed solution: I found the explanation in the existing docs quite succint, perhaps part of this could be added to the hello tutorial?
Roughly speaking:
widget = content
layout = container
Proposed solution: at least according to the API the layouts can be nested arbitrarily deep, if the nesting was fixed depth I would've expected to see a non-recursive type instead: https://ocaml.org/p/bogue/latest/doc/Bogue/Layout/index.html#create-layouts-from-other-layouts.
This comment from the source code seems relevant:
https://github.com/sanette/bogue/blob/master/lib/b_layout.ml#L216-L223
I suggest a small modification to this part:
. Thus, an element of type Layout.t can either be:
a true "room" (containing a single resident), or
a "house" containing several rooms.
Side-note: we have here the usual construction for a tree data structure: each node is either terminal (and called a leaf, which for us are widgets), or a vertex (for us, a layout), pointing to a list of sub-nodes.
To summarize, in Bogue, the complete GUI is simply a tree of layouts, and the leaves contain a widget.
The trunk of the tree (our main house, if you wish), will correspond to the layout associated with the window of the GUI. In Bogue we often call this special layout the "top layout", or "top house". (Yes, this may sound weird: our tree grows top-down...)
I think a 3rd bullet point would clarify all this: "rooms can be arbitrarily nested"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.