slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.72k stars 615 forks source link

Extract documentation from .slint files #104

Open ogoffart opened 4 years ago

ogoffart commented 4 years ago

We should generate the documentation from the widgets and the builtin elements from the builtins.slint and std-widgets.slint It should be easy to take the parser and make a tool that generate the documentation, in the similar way we parse the builtins.slint file in the compiler.

It should generate markdown as we currently have.

For the rust documentation, it could generate empty struct with these names so they appear in the search box

ogoffart commented 2 years ago

Note that for builtin enums, we do that with a macro in the enums.rs file. We probably should do the same for builtin elements using a macro just like for enums. (which would create both the Item, and the docs, and register them to the compiler)