You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to add event handling to the library — both keyboard and mouse — in which case we need to be able to identify precisely where the views are located within the terminal. Essentially this is the Rect passed to the render method of each view, but for some views — like text inputs — it may be a constrained portion of that Rect.
Views should be:
identifiable in some way, though not necessarily stably across renders
able to optionally identify a constrained portion of their dimensions
able to register handlers for events
These things will add some overhead, so should only occur when strictly necessary i.e. when event handlers are registered.
The text was updated successfully, but these errors were encountered:
The next question is; how will events be propagated to the user's code? So for a given render they pass to a terminal instance, how to they get events?
One idea is to have the View trait define an — optional — message type, and the call to terminal.render() returns a subscription of those messages. So views return the events they want to subscribe to, and handlers to convert those into messages. The terminal subscription is used to propagate them to user code. Maybe?
We want to add event handling to the library — both keyboard and mouse — in which case we need to be able to identify precisely where the views are located within the terminal. Essentially this is the Rect passed to the
render
method of each view, but for some views — like text inputs — it may be a constrained portion of that Rect.Views should be:
These things will add some overhead, so should only occur when strictly necessary i.e. when event handlers are registered.
The text was updated successfully, but these errors were encountered: