Basic View system #19
AndrewToaster
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I have been playing around and figured out a bare bones implementation of a View/Window system. I also made a minimal UI application.
How does it work
The 2 main interfaces are
IViewHostandIView. These are required for the windowing system to work. TheIViewcontains methods that are called by theIViewHostwhich are used to manipulate Form controls. One important thing is thatIViewhas no idea aboutIViewHost, theIViewHostshould perform all actions that modify the UI,IViewonly supplies values.IViewHosthas only one method,IViewHost.SetView(IView, object?), which handles everything for changing the UI.Current Implementation
Right now
IViewjust supplied an array ofControlwhich are then consumed byIViewHostwhich are then added to the Form.Interface Declarations
IView.cs
IViewHost.cs
Interface Implementation
HyperMcView.cs
SettingView.cs
A Demo of it working
EZj97YKNJ7.mp4
Conclusion
I would like to get some feedback what you think about this and how can it be improved.
Beta Was this translation helpful? Give feedback.
All reactions