Artifact Content
Not logged in

Artifact 555acacca4316e81342babbf37bdd8557b705ff1:

Wiki page [MIOGUI] by aldo 2016-12-15 13:39:11.
D 2016-12-15T13:39:11.329
L MIOGUI
P e1229101480c1a1c71ba6eff8c78206273c35da4
U aldo
W 3410
<h1>MIOGUI</h1>

More Immediate Operation GUI - Develop GUI in scheme in incremental & immediate mode!

Alpha version! Need some cleanup and some more widgets & demos...

[/doc/tip/demos/|Show me demos and screenshots!]

<h2>Concepts<h2>
<h3>Immediate Mode GUI</h3>
This means that the user never has to deal with objects (anti-oop way ;).

Some projects, written in C or C++
  *  [https://github.com/ocornut/imgui|dear imgui]
  *  [http://sol.gfxile.net/imgui/|Sol on Immediate Mode GUIs]
  *  [http://www.johno.se/book/imgui.html|IMGUI]
  *  [http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/|Zero Memory Widget]
 
A Microsoft paper on the subject:
  *  [https://www.microsoft.com/en-us/research/wp-content/uploads/2013/06/pldi097-burckhardt.pdf|It’s Alive! Continuous Feedback in UI Programming]
  

<h3>Cascading Stylesheets</h3>
  *  Based on [https://www.w3.org/Style/CSS/|CSS]<h3>
  *  CSS3 Flexbox layouts!
  *  CSS3 Transitions ;)
  *  CSS3 grid (planned)

<h3>Scheme</h3>
  *  Simple but powerful language
  *  REPL (Read Eval Print Loop) means you don't need to restart the program for seeing changes.
  *  We actually support chez scheme but it's possible to port to others schemes

<h3>Network REPL</h3>
  *  Nanomsg library allows to connect at any moment from anywhere to the runtime to modify the code on the fly without loosing state.

<h3>Cairo</h3>
  *  Nice graphics with simple and powerful API
  *  We could port the thing to opengl, GDI+, Xcb if needed

<h3>SDL2</h3>
  *  Powerful and portable abstraction for handling video and input and much more
  *  Could be replaced with some other system like Xcb, Win32 API, etc
  *  Why not send the frame to a web client and handle the ui with javascript. This could be done with cairo rendering an svg or sending directy some html.


<h2>Get & Install</h2>
You'll need [http://scheme.com|chez scheme] 9.4 and [https://pizzahack.eu/fossil/thunderchez|thunderchez]
Required also [http://nanomsg.org|nanomsg-1.0], [https://libsdl.org|sdl-2.0.4], [https://www.cairographics.org|cairo]

Checkout: You'll need [https://www.fossil-scm.org|fossil]

<verbatim>
fossil clone https://pizzahack.eu/fossil/miogui miogui.fossil
mkdir miogui && cd miogui && fossil open ../miogui.fossil
</verbatim>

You can also download the latest code as a tarball: [https://pizzahack.eu/fossil/miogui/tarball/miogui-latest.tar.gz|miogui-latest.tar.gz]

There is a also a mirror on [https://github.com/ovenpasta/miogui|github.com]
<verbatim>
git clone https://github.com/ovenpasta/miogui.git
</verbatim>

Remember to setup thunderchez properly.

Then run:
<verbatim>
# I recommend this limit setting because our sofware is alpha. If you run into a non-tail recursion you can lock your system :)
ulimit -Sv 1000000
scheme demos/demo1.ss
# or
scheme demos/demo2.ss
...
</verbatim>

Now switch to other console and type
<verbatim>
/path/to/miogui/remote-repl
</verbatim>
From there you can modify the code.
You ideally want to run that from inside emacs M-x run-scheme</em> and send code with C-x C-e or C-c C-e

<h2>Contact</h2>
Email me to ovenpasta (at) pizzahack (point) eu
To follow news subscribe to [https://pizzahack.eu/fossil/miogui/timeline.rss|RSS feed]

<h2>Donations</h2>
Please consider donating to the project!<br />
Bitcoin Address: 1CP3Dii8GJkf3wkSz8Qpq9R1RVaDKJDCej
Z cac7692296cc8772fa4809aea4d360cf