(ctor, type, str);
103 | node.update(str);
104 | }
105 | ```
106 |
107 | ## Decide how to handle stateful stuff
108 |
109 | Example: A window has the state of position and size.
110 | We really need to expose that to the use. Suggestion
111 | 1 is by ID. (I think ImGUI does it that way). Suggestion
112 | 2 is have the user provide it.
113 |
114 | Advantage to ID is it's opaque. What's saved is not up to the
115 | user. Advantage to exposing it is user can set and save it.
116 |
117 | For now going to try exposing
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ImHUI (**I**mmediate **M**ode **H**TML **U**ser **I**nterface)
2 |
3 | [Live Demo](https://greggman.github.io/ImHUI)
4 |
5 | **WAT?** I'm a fan (and a sponsor) of [Dear ImGUI](https://github.com/ocornut/imgui). I've written a couple of articles on it including [this one](https://games.greggman.com/game/imgui-future/) and [this one](https://games.greggman.com/game/rethinking-ui-apis/)
6 |
7 | Lately I thought, I wonder what it would be like to try to make an
8 | HTML library that followed a similar style of API.
9 |
10 | NOTE: This is not Dear ImGUI running in JavaScript. For that see
11 | [this repo](https://github.com/flyover/imgui-js). The difference
12 | is most ImGUI libraries render their own graphics. More specifically
13 | they generate arrays of vertex positions, texture coordinates, and
14 | vertex colors for the glyphs and other lines and rectangles for your
15 | UI. You draw each array of vertices using whatever method you feel like.
16 |
17 | This repo is instead actually using HTML elements like ``
18 | ``, ``, `