MOI's interface

 From:  Michael Gibson
4401.2 In reply to 4401.1 
Hi Ambimind, thanks, I'm glad you like MoI's UI mechanism.

MoI v1 and v2's UI uses a custom library that is built on top of the mshtml.dll HTML display and parsing engine.

You can see the actual HTML files that make up the UI in the \ui sub-folder underneath MoI's main installation folder, for example \ui\CommandBar.htm is what defines the bottom toolbar, and \ui\SidePane.htm is what controls the side pane UI.

The primary benefit for using HTML for program UI is that it has a lot of stuff in it to control the layout of text - basically the HTML engine does the layout of the text and places controls and MoI has some code that plugs into the engine and draws the appearance of some custom controls. You'll see those custom controls as custom tags in the .htm files, like <moi:CommandButton> for example.

For MoI v3 I've actually switched how this is all structured so that it will now be based off of the WebKit html engine instead of mshtml - see this previous thread for some explanation on why that's happening:

Some of the other benefits of this kind of UI structure is that the UI is much more separated and independent from the core C++ code - it's more feasible for people who want to write scripts for example to write some HTML for their script's UI rather than being forced to only write C++ code, and there are a few other features that kind of come out from the whole system like the dynamic resolution-independent size (set any size you want for the UI by the "UI size" slider under Options > General), and also being able to have the language change dynamically - having a sophisticated text layout system helps a lot for translations in general since it is possible to have longer text get word wrapped and the UI expands if needed to make more space for such things.

But I'm sorry, the whole system is pretty involved and at this time I'm not able to make it available as a separate library from MoI, it would just take too much time for me to prepare it for general use for other programs and also just to support someone else making a full application using it would be too time prohibitive for me currently.

- Michael