Skip to content

Commit

Permalink
improve doc / imgui
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Oct 3, 2023
1 parent 1455d72 commit b39dadd
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 14 deletions.
34 changes: 28 additions & 6 deletions bindings/imgui_bundle/Readme_pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,38 @@ online](https://traineq.org/ImGuiBundle/emscripten/bin/demo_imgui_bundle.html)

Dear ImGui is an implementation of the Immediate Gui paradigm.

### Consult the ImGui Manual
### Dear ImGui demo (and manual)

Dear ImGui comes with a complete demo. It demonstrates all the widgets,
together with an example code on how to use them.

[ImGui
Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html)
is an easy way to consult this demo, and to see the corresponding code.
The demo code is in C++, but read on for "Code advices" on how to
translate from C++ to python.
To run this demo in your browser, launch [ImGui
Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html).

For each widget, you will see the corresponding demo code (in C++. Read
the part "C++ / Python porting advices" to see how easy it is to
translate Gui code from C++ to python.

### Dear ImGui C++ API

Dear ImGui’s C++ API is thoroughly documented in its header files:

- [main API](https://github.com/ocornut/imgui/blob/master/imgui.h)

- [internal
API](https://github.com/ocornut/imgui/blob/master/imgui_internal.h)

### Dear ImGui Python API

The python API closely mirrors the C++ API, and its documentation is
extremely easy to access from your IDE, via thoroughly documented stub
(\*.pyi) files.

- [main
API](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/__init__.pyi)

- [internal
API](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/internal.pyi)

### Example

Expand Down
22 changes: 20 additions & 2 deletions bindings/imgui_bundle/doc/Readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,29 @@ TIP: Consider `demo_imgui_bundle` as a manual with lots of examples and related

Dear ImGui is an implementation of the Immediate Gui paradigm.

==== Consult the ImGui Manual
==== Dear ImGui demo (and manual)

Dear ImGui comes with a complete demo. It demonstrates all the widgets, together with an example code on how to use them.

https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html[ImGui Manual] is an easy way to consult this demo, and to see the corresponding code. The demo code is in {cpp}, but read on for "Code advices" on how to translate from {cpp} to python.
TIP: To run this demo in your browser, launch
link:https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html[ImGui Manual]. +
+
For each widget, you will see the corresponding demo code (in {cpp}. Read the part "C++ / Python porting advices" to see how easy it is to translate Gui code from {cpp} to python.

==== Dear ImGui C++ API

Dear ImGui's {cpp} API is thoroughly documented in its header files:

* link:https://github.com/ocornut/imgui/blob/master/imgui.h[main API]
* link:https://github.com/ocornut/imgui/blob/master/imgui_internal.h[internal API]

==== Dear ImGui Python API

The python API closely mirrors the {cpp} API, and its documentation is extremely easy to access from your IDE, via thoroughly documented stub (*.pyi) files.

* link:https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/$$__init__$$.pyi[main API]
* link:https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/internal.pyi[internal API]


==== Example

Expand Down
22 changes: 20 additions & 2 deletions bindings/imgui_bundle/doc/doc_parts/manual_imgui.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,29 @@ include::_utils.adoc[]

Dear ImGui is an implementation of the Immediate Gui paradigm.

==== Consult the ImGui Manual
==== Dear ImGui demo (and manual)

Dear ImGui comes with a complete demo. It demonstrates all the widgets, together with an example code on how to use them.

https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html[ImGui Manual] is an easy way to consult this demo, and to see the corresponding code. The demo code is in {cpp}, but read on for "Code advices" on how to translate from {cpp} to python.
TIP: To run this demo in your browser, launch
link:https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html[ImGui Manual]. +
+
For each widget, you will see the corresponding demo code (in {cpp}. Read the part "C++ / Python porting advices" to see how easy it is to translate Gui code from {cpp} to python.

==== Dear ImGui C++ API

Dear ImGui's {cpp} API is thoroughly documented in its header files:

* link:https://github.com/ocornut/imgui/blob/master/imgui.h[main API]
* link:https://github.com/ocornut/imgui/blob/master/imgui_internal.h[internal API]

==== Dear ImGui Python API

The python API closely mirrors the {cpp} API, and its documentation is extremely easy to access from your IDE, via thoroughly documented stub (*.pyi) files.

* link:https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/$$__init__$$.pyi[main API]
* link:https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/internal.pyi[internal API]


==== Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,31 @@

Dear ImGui is an implementation of the Immediate Gui paradigm.

## Consult the ImGui Manual
## Dear ImGui demo (and manual)

Dear ImGui comes with a complete demo. It demonstrates all the widgets, together with an example code on how to use them.

[ImGui Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html) is an easy way to consult this demo, and to see the corresponding code. The demo code is in C++, but read on for \"Code advices\" on how to translate from C++ to python.
::: tip
To run this demo in your browser, launch [ImGui Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html).\
\
For each widget, you will see the corresponding demo code (in C++. Read the part \"C++ / Python porting advices\" to see how easy it is to translate Gui code from C++ to python.
:::

## Dear ImGui C++ API

Dear ImGui's C++ API is thoroughly documented in its header files:

- [main API](https://github.com/ocornut/imgui/blob/master/imgui.h)

- [internal API](https://github.com/ocornut/imgui/blob/master/imgui_internal.h)

## Dear ImGui Python API

The python API closely mirrors the C++ API, and its documentation is extremely easy to access from your IDE, via thoroughly documented stub (\*.pyi) files.

- [main API](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/__init__.pyi)

- [internal API](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/internal.pyi)

## Example

Expand Down
48 changes: 46 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1144,12 +1144,56 @@ <h3 id="_dear_imgui_immediate_gui">Dear ImGui - Immediate GUI</h3>
<p>Dear ImGui is an implementation of the Immediate Gui paradigm.</p>
</div>
<div class="sect3">
<h4 id="_consult_the_imgui_manual">Consult the ImGui Manual</h4>
<h4 id="_dear_imgui_demo_and_manual">Dear ImGui demo (and manual)</h4>
<div class="paragraph">
<p>Dear ImGui comes with a complete demo. It demonstrates all the widgets, together with an example code on how to use them.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<div class="title">Tip</div>
</td>
<td class="content">
To run this demo in your browser, launch
<a href="https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html">ImGui Manual</a>.<br>
<br>
For each widget, you will see the corresponding demo code (in C&#43;&#43;. Read the part "C++ / Python porting advices" to see how easy it is to translate Gui code from C&#43;&#43; to python.
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="_dear_imgui_c_api">Dear ImGui C++ API</h4>
<div class="paragraph">
<p><a href="https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html">ImGui Manual</a> is an easy way to consult this demo, and to see the corresponding code. The demo code is in C&#43;&#43;, but read on for "Code advices" on how to translate from C&#43;&#43; to python.</p>
<p>Dear ImGui&#8217;s C&#43;&#43; API is thoroughly documented in its header files:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://github.com/ocornut/imgui/blob/master/imgui.h">main API</a></p>
</li>
<li>
<p><a href="https://github.com/ocornut/imgui/blob/master/imgui_internal.h">internal API</a></p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_dear_imgui_python_api">Dear ImGui Python API</h4>
<div class="paragraph">
<p>The python API closely mirrors the C&#43;&#43; API, and its documentation is extremely easy to access from your IDE, via thoroughly documented stub (*.pyi) files.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/__init__.pyi">main API</a></p>
</li>
<li>
<p><a href="https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/internal.pyi">internal API</a></p>
</li>
</ul>
</div>
</div>
<div class="sect3">
Expand Down

0 comments on commit b39dadd

Please sign in to comment.