Generated code

All files in one aura_add_ui produce aura_gen/aura_ui.h and one .cpp per file in the build directory. aurac only rewrites files that have changed. Every element is annotated with a file:line:column comment in the generated code.

cpp
namespace views {
struct CartLine {
	std::string description{};
	double quantity{};
	...
};
aura::ui::Value toValue(const CartLine& r);     // dynamic mode
aura::ui::Value toValue(const std::vector<CartLine>& list);

struct ShoppingCartArgs {
	std::vector<CartLine> lines{};
	std::string total{};
	bool canOrder{};
};
struct ShoppingCart {
	aura::ui::RectNode* root = nullptr;
	std::vector<CartLine> lines{};
	void setLines(const std::vector<CartLine>& v);  // state
	...
	std::weak_ptr<aura::Bindings> bindings;
	aura::ui::ScrollNode* list = nullptr;            // IDs
	std::vector<std::shared_ptr<CartRow>> row;      // inside a repeat
	std::function<void()> more;                     // signals
	std::function<void(double)> edit;
	static std::shared_ptr<ShoppingCart> build(aura::ui::RectNode& frame,
		const aura::ui::BasicContext<>& ctx, const ShoppingCartArgs& args = {});
};
}
Documentation source: docs/aura.md · Download Markdown

Search for topics, widgets or APIs.