I have been working on a simple GUI and have hit a roadblock. I haven’t found any examples or even readable source on how to create a GUI layout manager. I was wondering if anyone knew of some resources on creating one, or some source code that isn’t cryptic like Qt’s layout engine.
Share
It depends on what you mean by “layout manager”, and I’m not familiar with Qt, so that doesn’t give me much of a clue.
If you mean things like resizable window handling, though, I think the relevant term is “constraint solver”. I’ve never looked into it that much, but I believe GUI constraint solvers are based on linear programming – the Simplex algorithm and all that. It might be possible to do something with Gaussian Elimination, but I’m far from confident about that.
Based on a quick search for “gui layout linear programming”, you might find this paper from CiteSeerX interesting – there’s a PDF download. If you don’t like cryptic, well, at a glance at least it’s not exactly math heavy, but I suspect it’s not light reading either. I guess I’ll find out shortly, as you’ve got me interested.