From 163625fcd399eebd071df407dfee3721d0d20b15 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 9 Jul 2021 20:24:42 +0200 Subject: [PATCH] C++ docs: finish re-organzing the C++ docs entry Instead of repeating the table of contents, provide a proper intro page - based on the Github README - and group the remaining content into Getting Started, Reference and Integration sections. --- api/sixtyfps-cpp/docs/genindex.rst | 3 + api/sixtyfps-cpp/docs/index.rst | 72 ++++++++++++++++++--- docs/resources/sixtyfps-docs-highlight.html | 2 +- 3 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 api/sixtyfps-cpp/docs/genindex.rst diff --git a/api/sixtyfps-cpp/docs/genindex.rst b/api/sixtyfps-cpp/docs/genindex.rst new file mode 100644 index 000000000..44c172394 --- /dev/null +++ b/api/sixtyfps-cpp/docs/genindex.rst @@ -0,0 +1,3 @@ +=========== +Index (C++) +=========== \ No newline at end of file diff --git a/api/sixtyfps-cpp/docs/index.rst b/api/sixtyfps-cpp/docs/index.rst index effa73e21..667f60118 100644 --- a/api/sixtyfps-cpp/docs/index.rst +++ b/api/sixtyfps-cpp/docs/index.rst @@ -14,24 +14,80 @@ Welcome to SixtyFPS C++'s documentation! .. toctree:: :maxdepth: 2 - :caption: Contents: - - intro.md + :hidden: + :caption: Getting Started cmake.md - getting_started.md + First Steps + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: Reference api/library_root + genindex + language.rst +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: C++ / .60 Integration + Type Mapping to C++ Example Generated Code -Indices and tables -================== +.. image:: https://github.com/sixtyfpsui/sixtyfps/workflows/CI/badge.svg + :target: https://github.com/sixtyfpsui/sixtyfps/actions + :alt: GitHub CI Build Status + +`SixtyFPS `_ is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. +SixtyFPS C++ is the C++ API to interact with a SixtyFPS UI from C++. + +The .60 Markup Language +======================= + +SixtyFPS comes with a markup language that is specifically designed for user interfaces. This language provides a +powerful way to describe graphical elements, their placement, and the flow of data through the different states. It is a familiar syntax to describe the hierarchy +of elements and property bindings. Here's the obligatory "Hello World": + +.. code-block:: 60-no-preview + + HelloWorld := Window { + width: 400px; + height: 400px; + + Text { + y: parent.width / 2; + x: parent.x + 200px; + text: "Hello, world"; + color: blue; + } + } + +Check out the `language reference `_ for more details. + +Architecture +============ + +An application is composed of the business logic written in C++ and the `.60` user interface design markup, which +is compiled to native code. + +.. image:: https://sixtyfps.io/resources/architecture.drawio.svg + :alt: Architecture Overview + +Developing +========== + +You can create and edit `.60` files using our `SixtyFPS Visual Studio Code Extension `_, +which features syntax highlighting and live design preview. + +For a quick edit and preview cycle, you can also use the :code:`sixtyfps-viewer` command line tool, which can be installed using :code:`cargo install sixtyfps-viewer`, +if you have `Cargo `_ installed. + +In the next section you will learn how to install the SixtyFPS C++ library and the CMake build system integration. -* :ref:`genindex` -* :ref:`search` diff --git a/docs/resources/sixtyfps-docs-highlight.html b/docs/resources/sixtyfps-docs-highlight.html index fa8d6aec1..7fda835fc 100644 --- a/docs/resources/sixtyfps-docs-highlight.html +++ b/docs/resources/sixtyfps-docs-highlight.html @@ -90,7 +90,7 @@ // The Sphinx/my_st generated HTML for code blocks does not use tags, so highlight.js' // default selector "pre code" does not match. Let's do it by hand: - for (block of document.querySelectorAll("div.highlight-60 div.highlight pre")) { + for (block of document.querySelectorAll("div.highlight-60 div.highlight pre, div.highlight-60-no-preview div.highlight pre")) { hljs.highlightElement(block) } }