I want to write a simple GUI framework designed for a game, in order to learn the inner workings and nitty-gritty of how GUI 'engines' such as Unity3D's GUI work. I can't find any resource to help me get started.
What I'm looking for exactly is the abstract methodology of GUI programming, so things like what are the components of a GUI framework, how often and in what ways should the interface be updated with data, what are the different ways to connect the visuals in the interface to the logic behind them, how should clicking events be handled, things like that.
What I tried
I've been trying to research my options for months but to no avail. Looking up keywords like "GUI programming" or "GUI programming philosophies" leads nowhere and doesn't answer the questions I mentioned above.
There are plenty of resources and tutorials out there for things like OpenGL, how to write a game loop, how to write a physics engine, but nothing like that for writing GUI systems. The wikipedia pages for these topics are also usually a good starting point, but the GUI entries are too design-focused, failing to focus on programming-specific methodology/architecture.
I also tried starting from the web GUI frameworks I know such as React and Angular, and learned a few interesting things like the the view-model-viewmodel architecture and React's virtual DOM, but I still don't know how to apply them, how to generalize them into some framework/philosophy I can follow while coding, and whether there are any other possible options.
P.S. My environment is C# and OpenGL through OpenTK, but that hopefully won't matter in terms of respondents giving a broad overview.