
A simple UI framework for Rust - dolftax
https://github.com/cybergeek94/kiss-ui
======
anonfunction
Screenshots would be helpful for a project like this.

~~~
pdpi
[http://iup.sourceforge.net/en/screenshots.html](http://iup.sourceforge.net/en/screenshots.html)

These are for the widget toolkit this project is based on, rather than from
the project proper, but it's better than nothing I guess.

------
yarper
Rather than seeing more GTK bindings or lookalikes I personally am waiting for
something like WPF/XAML or JavaFx/FXML to turn up.

Anyone seen any projects like this for rust?

~~~
steveklabnik
It's not like that, but the other non-bindings toolkit that exists is Conrod:
[https://github.com/PistonDevelopers/conrod](https://github.com/PistonDevelopers/conrod)

------
halosghost
Cool, I didn't know about IUP at all! Rust has burned me a bit lately (muh
128-bit arithmetic, no!), but I still have a fair bit of nostalgia for Lua; I
have a sneaking suspicion I will look to IUP for some of my planned projects.
At the very least, cool project and I learned about another cool thing!

~~~
outworlder
IUP is one of the friendliest toolkits to write bindings for.

------
fit2rule
Can anyone explain what IUP is and why its needed for this toolkit? Because it
seems to me that a UI framework shouldn't come with a dependency on system-
specific binaries, but that's just because I don't understand what it is,
probably.

~~~
tbirdz
IUP is a GUI Widget Toolkit.

------
jguegant
Out of curiosity: why the author tends to write "self" at the end of the
methods ?

~~~
weavie
This would be to enable method chaining so you can do stuff like:

    
    
        dialog.set_title("blah").set_size_pixels(100, 100);
    

(note syntax may be out - I am not a Rust expert...)

~~~
zimbatm
Couldn't one write a chain macro instead ? That way you don't have to rely on
the library to return self.

    
    
        chain!(dialog, set_title("blah"), set_size_piels(100, 100));

~~~
rylee
Okay, yes, you _could_ do that, but the library itself provides this as its
idiomatic way of doing things.

~~~
escherize
The macro is a better solution, since you can't rely on every library doing
this kind of thing.

~~~
skj
Why wouldn't I want to do

dialog.set_title("blah");

dialog.set_size_piels(100, 100);

on two lines?

~~~
tedunangst
Because functional programming.

~~~
sp332
To expand a bit: Sometimes, instead of thinking about nouns all the time, you
want to think about verbs. Instead of saying "mutate this noun by applying
verb1" and then "mutate this noun by applying verb2" etc, you are creating a
new verb. The new verb is "verb1 then verb2 then...." And then when you have
the verb defined, you apply it to your object.

------
whoisthemachine
Impressive what people are building in little time with Rust!

------
amelius
Cool, but why not build on top of the Servo engine? Or am I missing something?

~~~
phn
Because it is not web based.

~~~
amelius
Does that matter? I bet the core Servo libraries don't even deal with
networking. And using Servo has obvious advantages such as a being a good
render engine supporting incremental updates, probably being well-documented,
well-tested, and conforming to well-known standards (yes, also used on the
web, but does that matter really?)

~~~
phn
Honestly, it matters. Current web technologies aren't the end game solution
for interfaces and, IMO, are pretty horrible to work with for that purpose.
(Pretty beaten up topic by now, but lets take a moment to think for a second
about vertical centering in HTML+CSS. /sigh </rant>)

Still, my answer was just referring to the fact that this is not using web
tech, and thus, not using servo or any other existing browser engine.

~~~
marchelzo
flexbox + viewport units have made this better.

