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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

898 Views
robroz
Contributor III

Hi,

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,

regards,

Bul.

Tags (3)
0 Kudos
Reply
3 Replies

709 Views
Gargy
NXP Employee
NXP Employee

Hello,

this is not so impossible request, it just depends on your implementation of screen. I was solve similar issue under D4CD what is clone of eGUI for alphanumeric line LCD.

So I did screen c and h file, own Activate screen function for this screen and return callback function. And the input settings (text of labels etc) I handled trough the input parameter (descriptor structure). Check the code included (not for eGUI but very similar D4CD driver).

Add 2. you can handled these in your code which will call this screen.

Look at the code.

Also the next example is Open file dialog in eGUI 3.0 demo.

Petr

709 Views
robroz
Contributor III

Hi,

thanks for response. It really helped me to get going. But I still have one question/problem.

Now, I know how to start some screen and give it some custom information to display... But I'd still need to activate a series of same screens in a row. For instance I'd like to activate new screen that is the same as current screen. I still get error in both ways: if I add current screen as external screen definition or if I just activave new screen that is the same as current one...

Any trick to do this or is this something not possible by desing ?

Thanks in advance,

regards,

Bul.

0 Kudos
Reply

709 Views
Gargy
NXP Employee
NXP Employee

Hi,

I don't see there any problem, just all content information create on heap and keep the setting of the screen updated also on activate function, by this way for example:

Create new screen : create content structure on heap, fill  up by input information and set-up graphic object.

And if you create new one, if you keep same way you will heve new screen on same source code.

The important is in OnActivate function set-up the object structure by the content structure.

You just to solve how to handle pointer to content data for each screen.

Petr

0 Kudos
Reply