AnsweredAssumed Answered

eGUI: Is it possible to have generic screens with custom content (activate same screen as current one) ?

Question asked by robroz on May 18, 2013
Latest reply on May 26, 2013 by Petr Gargulak



I'm pretty sure that my question sounds weird... But let me explain what I'm trying to do.


I'm implementing fairly descent GUI that is composed of 40+ screens. Many of those screens are pretty similar (have 4 labels and 4 buttons, but each has custom content). Instead of generating separate screens, I'd like to make code more manageable and I'm investigating possibility of using generic windows for all of them...

I'd like to set texts and other configuration parameters before activating screen and then detect return from that screen and translate changes to real data changes.. I can do this if I start only one level of those parametric child screens.


But I have for instance 4 screens of settings for one room and all of them have same look'n'feel. Only texts and data are different. Doing this I need possibility to activate another instance of same screen, but here I got into trouble. I get following error :

    Error[Pe167]: argument of type "D4D_SCREEN const *" is incompatible with parameter of type "struct D4D_SCREEN_S *" E:\Freescale\Freescale_MQX_4_0\demo\DialogD13_Demo_v5\src\LCD\d13_screen_Mans1.c 223 :


1. Is my thinking completely impossible to achieve or can this be solved in some easy way ?


2. for proper implementation of this, I also need following feature. When screens are queued by activating them, is also content of all objects also saved in queue. That means that if I activate screen for the first time and set title text to "screen1" and then activate another instance of same screen and set title to "screen2", will those two titles be saved on queue and when I escape screen2, then "screen1" title will be shown ? Is this possible at all?


3. Any other way of dealing more efficiently with fairly complex GUIs under eGUI? I could use templates, but once screens are generated you have to make changes to all of them... I'd like to avoid this...


Thanks in advance,