Open bartgrantham opened 5 years ago
Were you looking for this? https://github.com/andlabs/libui/blob/7138276ccfbde94873cb6e2db65642adcbd2ee19/ui.h#L126
expected to see this as a method in the AreaHandler interface
The draw callback in the AreaHandler get's called on resize as well, because a redraw is needed.
Of course. That's what I was looking for, thank you.
Although I'm still curious: there's no big, heavy "event" system in libui, is that a specific design goal?
That depends on what you mean by "big, heavy "event" system".
And yes, Area size handling needs to be improved, as an extension of Area scroll handling needing to be improved.
Event system: like SDL2 where I would wrap some kind of event polling and then switch on the type.
For what I was working on I was expecting to hook into window resize, but I guess with layout being governed by window size it makes sense that ultimately it's an event on Area that I wanted to use. The draw callback in the WindowHandler interface is fine for this.
BTW, what is the best place to ask questions about ui
or libui
? So far I'm digging it and want to make sure I get the most out of it as it develops.
I'll address your response later; for now, the only real place to ask questions is here.
Is it possible to capture resize events on areas, controls, windows, ...anything? I'm using the Go
ui
library and expected to see this as a method in the AreaHandler interface. I don't see any event-handling mechanisms inlibui
, is this an explicit design decision to avoid having an event queue, event pump, etc.?