There is a measuring and monitoring device. It is necessary for him to develop an interface with a bunch of different information, settings and explanations, scattered across a pile of small screens (physically, there is only one screen).
The text can be selectable and non-separable (that is, when you click the navigation buttons, nothing happens to it, for screen titles and other static signatures). It can also be editable - when, after selecting and pressing a certain button, the value of the selected parameter can be adjusted. The text can also be arranged arbitrarily enough. The font can change (from three or four different ones), for example, to specify indices along the length of a line.
For the selected item you need one background, for the edited one another.
Different dynamic numerical and string values can be found in the text. "The nurse has% d patties," conditionally. Conventionally, since printf and others do not use it.
And still some points that have dynamic values in their composition should be redrawn regularly with actual information from sensors.
And here's the problem - how to present all these small screens (i.e., the structure of both one small screen and their relationships) in the memory of the controller. Either make some big tree from the structures describing all this, or somehow do for each small screen its own function of output and processing input. I do not know.
And so that from the control code it looks quite simple:
DrawMenu(1); while(1) { int key = GetKey(); switch(key) { case 0: OperateMenu(1, MNU_NEXTITEM); break; ... } }
How to act competently and from where to approach this issue?