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
-
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
IViewHost
andIView
. These are required for the windowing system to work. TheIView
contains methods that are called by theIViewHost
which are used to manipulate Form controls. One important thing is thatIView
has no idea aboutIViewHost
, theIViewHost
should perform all actions that modify the UI,IView
only supplies values.IViewHost
has only one method,IViewHost.SetView(IView, object?)
, which handles everything for changing the UI.Current Implementation
Right now
IView
just supplied an array ofControl
which are then consumed byIViewHost
which 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