Skip to content

Commit

Permalink
Update docs / 2024-01-14 / 22:29:11
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Jan 14, 2024
1 parent 800c93c commit b57b60a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 40 deletions.
19 changes: 19 additions & 0 deletions docs/book/00_00_intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ <h2> Contents </h2>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#demos-real-world-apps">Demos &amp; real world apps</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#motto">Motto</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#advanced-layout">Advanced layout</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#custom-3d-background">Custom 3D background</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#imgui-manual">ImGui Manual</a></li>
Expand Down Expand Up @@ -479,6 +480,23 @@ <h3>Contribute<a class="headerlink" href="#contribute" title="Permalink to this
<hr class="docutils" />
<section id="demos-real-world-apps">
<h2>Demos &amp; real world apps<a class="headerlink" href="#demos-real-world-apps" title="Permalink to this heading">#</a></h2>
<section id="motto">
<h3>Motto<a class="headerlink" href="#motto" title="Permalink to this heading">#</a></h3>
<p>The minimum code to start developing a GUI app should be… minimal. Here is a multiplatform Hello World in 7 lines.</p>
<p><em>6 lines of C++</em></p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;hello_imgui/hello_imgui.h&quot;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">[])</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">HelloImGui</span><span class="o">::</span><span class="n">Run</span><span class="p">(</span>
<span class="w"> </span><span class="p">[]{</span><span class="w"> </span><span class="n">ImGui</span><span class="o">::</span><span class="n">Text</span><span class="p">(</span><span class="s">&quot;Hello, world!&quot;</span><span class="p">);</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="c1">// Gui code</span>
<span class="w"> </span><span class="s">&quot;Hello!&quot;</span><span class="p">,</span><span class="w"> </span><span class="nb">true</span><span class="p">);</span><span class="w"> </span><span class="c1">// Window title + Window size auto</span>
<span class="p">}</span>
</pre></div>
</div>
<p><em>1 line of CMake</em></p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nb">hello_imgui_add_app</span><span class="p">(</span><span class="s">hello_world</span><span class="w"> </span><span class="s">hello_world.cpp</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="advanced-layout">
<h3>Advanced layout<a class="headerlink" href="#advanced-layout" title="Permalink to this heading">#</a></h3>
<p>The docking demo show how to handle complex layouts, use themes, store user settings, reduce FPS and CPU usage when idling, load fonts and icons, and much more</p>
Expand Down Expand Up @@ -588,6 +606,7 @@ <h3>Theme tweaking<a class="headerlink" href="#theme-tweaking" title="Permalink
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#demos-real-world-apps">Demos &amp; real world apps</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#motto">Motto</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#advanced-layout">Advanced layout</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#custom-3d-background">Custom 3D background</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#imgui-manual">ImGui Manual</a></li>
Expand Down
19 changes: 0 additions & 19 deletions docs/book/05_05_get_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ <h2> Contents </h2>
</div>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#motto">Motto</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#starter-template">Starter template</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cmake-utility-hello-imgui-add-app">CMake utility: hello_imgui_add_app</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#assets-and-app-customization">Assets and app customization</a></li>
Expand All @@ -411,23 +410,6 @@ <h2> Contents </h2>

<section class="tex2jax_ignore mathjax_ignore" id="get-started">
<h1>Get started<a class="headerlink" href="#get-started" title="Permalink to this heading">#</a></h1>
<section id="motto">
<h2>Motto<a class="headerlink" href="#motto" title="Permalink to this heading">#</a></h2>
<p>The minimum code to start developing a GUI app should be… minimal. Here is a multiplatform Hello World in 7 lines.</p>
<p><em>6 lines of C++</em></p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;hello_imgui/hello_imgui.h&quot;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">[])</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">HelloImGui</span><span class="o">::</span><span class="n">Run</span><span class="p">(</span>
<span class="w"> </span><span class="p">[]{</span><span class="w"> </span><span class="n">ImGui</span><span class="o">::</span><span class="n">Text</span><span class="p">(</span><span class="s">&quot;Hello, world!&quot;</span><span class="p">);</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="c1">// Gui code</span>
<span class="w"> </span><span class="s">&quot;Hello!&quot;</span><span class="p">,</span><span class="w"> </span><span class="nb">true</span><span class="p">);</span><span class="w"> </span><span class="c1">// Window title + Window size auto</span>
<span class="p">}</span>
</pre></div>
</div>
<p><em>1 line of CMake</em></p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nb">hello_imgui_add_app</span><span class="p">(</span><span class="s">hello_world</span><span class="w"> </span><span class="s">hello_world.cpp</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="starter-template">
<h2>Starter template<a class="headerlink" href="#starter-template" title="Permalink to this heading">#</a></h2>
<div class="admonition tip">
Expand Down Expand Up @@ -610,7 +592,6 @@ <h2>Immediate GUI mode<a class="headerlink" href="#immediate-gui-mode" title="Pe
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#motto">Motto</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#starter-template">Starter template</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cmake-utility-hello-imgui-add-app">CMake utility: hello_imgui_add_app</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#assets-and-app-customization">Assets and app customization</a></li>
Expand Down
19 changes: 19 additions & 0 deletions docs/book/_sources/00_00_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ Quality contributions are welcome!

## Demos & real world apps

### Motto

The minimum code to start developing a GUI app should be... minimal. Here is a multiplatform Hello World in 7 lines.

*6 lines of C++*
```cpp
#include "hello_imgui/hello_imgui.h"
int main(int , char *[]) {
HelloImGui::Run(
[]{ ImGui::Text("Hello, world!"); }, // Gui code
"Hello!", true); // Window title + Window size auto
}
```
*1 line of CMake*
```cmake
hello_imgui_add_app(hello_world hello_world.cpp)
```


### Advanced layout

Expand Down
20 changes: 0 additions & 20 deletions docs/book/_sources/05_05_get_started.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# Get started

## Motto

The minimum code to start developing a GUI app should be... minimal. Here is a multiplatform Hello World in 7 lines.

*6 lines of C++*
```cpp
#include "hello_imgui/hello_imgui.h"
int main(int , char *[]) {
HelloImGui::Run(
[]{ ImGui::Text("Hello, world!"); }, // Gui code
"Hello!", true); // Window title + Window size auto
}
```
*1 line of CMake*
```cmake
hello_imgui_add_app(hello_world hello_world.cpp)
```


## Starter template

```{tip}
Expand Down
2 changes: 1 addition & 1 deletion docs/book/searchindex.js

Large diffs are not rendered by default.

0 comments on commit b57b60a

Please sign in to comment.