Open yglukhov opened 7 years ago
Hi @yglukhov, I'm so happy you also interested in layout systems. I'd like to thank you for your nice kiwi library.
I assumed programmatically
means doing something from scripting language, in this case from lua side.
changing the widgets geometry programmatically. How would such changes be propagated to the solver and further to other widgets? the parsed document is stored as AST, much like programming language. The variable participated/used in constraint solver are represented as symbol
to variable. The symbol have flags, and any changes to variable value don't necessarily have instant effect. After all changes be made, we can update the solver accordingly, then redraw the whole layout.
modifying the view hierarchy programmatically. How would addition/removal of widgets affect existing constraints of neighboring widgets? similar with point number 1, changes in the AST means the tree would go into another semantic pass, and the layout language have features to cope with this situation. The relationship between widgets is not rigid, the layout language use flexible relationship between widgets, and it also has choice
mechanism in case the previous relationship failed. The layout language also has class
system, the class
can be added or removed from a widget programmatically, and the whole relationship among widgets can be changed.
animation? How would you animate widget geometry so that it propagates to constraints of other widgets? I only have vague ideas about this, not sure exactly how to implement animation, perhaps I will figure it out later. My experiments show it's not too difficult, the constraint can be relaxed.
Would you mind joining https://gitter.im/nim-lang/Nim or #Nim irc so its easier to chat? err, no promise, I don't have much time to chat over there. I don't mind answering questions here.
I'd like to thank you for your nice kiwi library.
I'm happy it has found its user too =)
in this case from lua side
As a matter of fact, that was another question I wanted to ask. =) Why not go fully native and provide optional thinner bindings for foreign VMs?
Ok, those make sense, thanks.
Why not go fully native and provide optional thinner bindings for foreign VMs?
Yup, not everyone need lua. Nim itself already comfortable to work with. and luckily it's only a matter of conditional compilation to enable/disable lua presence.
I would suggest to start thinking about animation before you've gone too far =)
Agree, if razcal has a functional animation system + freedom to draw anything to the rendering buffer, it would attract users. need to change my current roadmap. Thank you.
turn out, these questions are valid issue.
Hey, sorry, could not find you on irc or gitter, so writing here. I am also interested in layout systems and layout definition languages. Have you considered the cases for constraint-based layout such as:
Would you mind joining https://gitter.im/nim-lang/Nim or #Nim irc so its easier to chat?