mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Remove the example code from the interpreter namespace docs again
I can't seem to convince sphinx/breathe/doxygen to include them like they work in the class docs. I tried the markdown quotes, spaces, \code/\endcode, \rst/\endrst but no luck yet.
This commit is contained in:
parent
140de87351
commit
1e089389e5
1 changed files with 0 additions and 38 deletions
|
@ -38,44 +38,6 @@ struct ErasedComponentBox : vtable::Dyn
|
||||||
/// The entry point for this namespace is the \ref ComponentCompiler, which you can
|
/// The entry point for this namespace is the \ref ComponentCompiler, which you can
|
||||||
/// use to create \ref ComponentDefinition instances with the ComponentCompiler::build_from_source()
|
/// use to create \ref ComponentDefinition instances with the ComponentCompiler::build_from_source()
|
||||||
/// or ComponentCompiler::build_from_path() functions.
|
/// or ComponentCompiler::build_from_path() functions.
|
||||||
///
|
|
||||||
/// Example:
|
|
||||||
///
|
|
||||||
/// This example loads a `.60` dynamically from a path:
|
|
||||||
///
|
|
||||||
/// ```
|
|
||||||
/// #include <sixtyfps_interpreter.h>
|
|
||||||
///
|
|
||||||
/// sixtyfps::interpreter::ComponentCompiler compiler;
|
|
||||||
/// auto definition =
|
|
||||||
/// compiler.build_from_path("hello.60");
|
|
||||||
/// if (definition) {
|
|
||||||
/// auto instance = definition->create();
|
|
||||||
/// instance->run();
|
|
||||||
/// }
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// This example loads a `.60` from a string and set some properties:
|
|
||||||
///
|
|
||||||
/// ```
|
|
||||||
/// #include <sixtyfps_interpreter.h>
|
|
||||||
///
|
|
||||||
/// std::string code = R"(
|
|
||||||
/// MyWin := Window {
|
|
||||||
/// property <string> my_name;
|
|
||||||
/// Text {
|
|
||||||
/// text: "Hello, " + my_name;
|
|
||||||
/// }
|
|
||||||
/// }
|
|
||||||
/// )";
|
|
||||||
///
|
|
||||||
/// sixtyfps::interpreter::ComponentCompiler compiler;
|
|
||||||
/// auto definition =
|
|
||||||
/// compiler.build_from_source(code, "");
|
|
||||||
/// auto instance = definition->create();
|
|
||||||
/// instance->set_property("my_name",
|
|
||||||
/// sixtyfps::interpreter::Value(sixtyfps::SharedString("World"))); instance->run();
|
|
||||||
/// ```
|
|
||||||
namespace sixtyfps::interpreter {
|
namespace sixtyfps::interpreter {
|
||||||
|
|
||||||
class Value;
|
class Value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue