Hi @HP,
Yes, this is the way you transition to other screens. Using the designer, they're generated for you when you have a "change screen" interaction defined. Here's an example - From screen 2 i defined an interaction to go to screen1 with NO special transition animation. The possibilibies are:
- No transition
- Slide Transition
- Cover Transition
This interaction will cause the following methods to be generated:
/*
* Screen Transition Declarations
*/
// Screen1
void FrontendApplicationBase::gotoScreen1ScreenNoTransition()
{
transitionCallback = touchgfx::Callback<FrontendApplicationBase>(this, &FrontendApplication::gotoScreen1ScreenNoTransitionImpl);
pendingScreenTransitionCallback = &transitionCallback;
}
void FrontendApplicationBase::gotoScreen1ScreenNoTransitionImpl()
{
makeTransition<Screen1View, Screen1Presenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
}
If you'd chosen another transition then the methods and arguments would be different. If you want to transition to a screen programatically, e.g. if you get a certain message from the backend, you will call it like in the code in the previous post:
static_cast<FrontendApplication*>(Application::getInstance())->gotoScreen1ScreenNoTransition();
The methods generated by the designer are in gui_generated/src/common/FrontEndApplicationBase.cpp
You can add your own, manually, in gui/src/common/FrontEndApplication.cpp
/Martin