2022-08-10 06:46 AM
Hi all!
So in our application we want to call the screen classes themselves in c. We have setup linking header files etc and we are able to call screen transistion via the frontendapplication with:
#include <gui_generated/main_screen/MainViewBase.hpp>
void transition(void) {
static_cast<FrontendApplication(Application::getInstance())>gotoSetup_Boot_Branded_2ScreenNoTransition();
}
But we want to call the screen classes themselves... is there an easy way to do this? I've been trying to, but only get error during compiling. Something like this:
void transition(void) {
static_cast<MainViewBase(Mainview::getInstance())>Progress_Update();
}
Any help would be appreciated thanks!
Best
Jacob
2022-08-10 07:05 AM
Try explain because is there an easy way to do this? NO
2022-08-10 08:40 AM
What do you mean? Are you saying there is no easy way to do this?
2022-08-11 06:03 AM
This sounds a bit like an XY problem.
What larger problem are you trying to solve here?
2022-08-11 06:18 AM
Hi Michael,
You mean flipping the screen in the X or Y direction? No, my problem is that I want to call the individual screen object classes in order to update things like wildcards from the backend, as of right now I can only access screen transitions from the backend with the frontendapplication, but I want to be able to access individual screens, like MainView or some other arbitrary screen. Does that make sense?
2022-08-11 07:52 AM
Maybe you need more learn about C++. For TouchGFX you have two choices
in mode ltick ...
if((Key_Code==ENC_SEL_DN && Enc_Sel.rate>25) || RC5_Inst==IR_INPDN)
{
static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(74);
}
if((Key_Code==ENC_SEL_UP && Enc_Sel.rate>25) || RC5_Inst==IR_INPUP)
{
static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(73);
}
in screen handletick ...
if(SharedC_Settings.theme != 0)
{
SharedC_Settings.theme-=1;
DisplayGauge();
}