Clement Benard

Results 25 comments of Clement Benard

Actually it was a slice of `Env`s originally, but it was a mess to manage. For example, how do you address a grid ? you would need to remember the...

You're right, we only address them once, but it's mainly for clarity purposes. For simple layouts, like a grid or a list, a slice is perfectly fine. But if you...

This is a great alternative i hadn't thought about, and it would make a lot of things easier. I'll implement that instead, thanks.

Done, i also introduced a `Box` layout and a true `layout.Mux`. I think there is an abstraction to be found for merging `gui.Mux` and `layout.Mux`, and this still needs some...

Thanks ! I'll create the SplitFunc type, as it will be more understandable and documentable this way. For its arguments, I think it's fine as-is, because you need to create...

I was also thinking of splitting the Layout interface with a `Redrawer` interface, that could be used for a `widgets` package in the future. This `Redrawer` would be in the...

I refactored quite a bit and added an `Items() []*gui.Env` func to the `Layout` interface, this way this is less obfuscated and feels less like *magic*.

I agree, it feels like a hack, but it felt less like a hack than some `Init()` func. It was more for lack of a better idea. I think we...

Well after implementing it it works really well, there's just something strange I can't quite put my finger on. Also I changed the initialization from functional options to struct literals...

I found two major problems with this approach: - a `Layout` can't ask for a childs redraw by itself - a `Layout` can't intercept `Event`s The first thing that would...