GUIX Templates

I just want to make sure my understanding is right on templates.

Say, I have a template with top bar (header) and body.

Now I insert a template (So.. I go to Insert -> template -> top_bar)

The template contains a window which is the body.

I have data updating in real time that is updated in the top bar using the calls  gx_prompt_text_set(&top_bar.top_bar_prompt_1, result_buffer); 

It seems like the above call does not update the text, but (referencing &window_1.base.top_bar_prompt_1)  gx_prompt_text_set(&window_1.base.top_bar_prompt_1, result_buffer);  works fine and updates the top bar prompts, but the problem is that if I create another screen say window_2 that requires the same top bar and I need to show the same data, then I will have to do gx_prompt_text_set(&window_2.base.top_bar_prompt_1, result_buffer); which seems like for every window that uses that template I will have to update the top bar icons manually in each of their event handlers. 

To overcome this repeated manual update of top bar elements in each window handlers, I deleted the template and now have a top bar window, body window as two different fragments in screen which works perfect with just referencing the top bar elements as for e.g.  &top_bar.top_bar_prompt_1 

Is there a similar way to achieve this functionality of using template with just one place to reference the top bar elements and not inside all window handlers?

My understanding is that GUIX Templates are just place holders for icons, prompts, text boxes but not one place reference for all windows that inherit that template.

 I might be completely wrong on this, So any clarification/inputs on this is much appreciated.



  • Hello Sam,

    I have created a simple project with a template window defined and run some tests. I agree with you - the solution is to create two separate windows: the top bar and the body, without using a template.

    In my opinion the template functionality is supposed to be used to design elements in the GUIX Studio, which are going to be added to the project multiple times and which should have the same look. Think about a template same as about any predefined GUIX Studio widget, such as: "Text Button", "Prompt", "Circular Gauge" etc. When you add one to the project, it becomes an individual instance (derived instance of the template).

    A big advantage of templates is that you can change (in GUIX Studio) the properties of all these instances at once - by changing the properties of the template only. Please refer to the GUIX Studio documentation for the details:
    GUIX Studio User Guide > Chapter 5 GUIX Studio Screen Designer > Using templates

    You may also find useful the following forum threads:

    I tried to use a similar reference as you did ("top_bar.top_bar_prompt_1"), however I get the "undefined reference to `top_bar'" error message during the compilation. Do you also experience such error message? Which SSP version do you use?

    Best regards,

  • In reply to anper:

    Hi Anper,
    Thanks for your prompt feedback on this.
    I don't get any error message when I reference as top_bar.top_bar_prompt_1
    I am using SSP 1.1.3 and GUIX

  • In reply to Sam:

    Hello Sam,

    thank you for your feedback.

    I used SSP 1.3.3 and GUIX Studio with GUIX library 5.4.0 to create my project.

    After a short investigation I established that the <project_name>_specifications.c file generated by newer GUIX Studio versions ( does not include the template window control block definition. Whereas in case of older GUIX Studio versions ( this file does include such definition. This is why you were able to refer to the template window structure, while I was getting an error message.

    Best regards,

  • In reply to anper:

    That's good to know.

    Thanks for your time on this.

  • In reply to anper:

    Hello anper,

    We are suffering the same issue you have described in your previous post. We are updating an old GUIX project created with version and GUIX library 5.3.0 to the new version and library 5.4.0. In this old project we were using templates and the control block definition was created. In the new project this definition is not created ,so we have some errors when compiling our code. Is there any solution to this issue?

    Thanks in advance!

  • In reply to Imanol:

    Hi Imanol,

    I created a new support ticket for you regarding your question. Your ticket number is 194092.
    Our Engineer will get back to you soon.

    RenesasRulz Forum Moderator