cancel
Showing results for 
Search instead for 
Did you mean: 

How to change screen with touchgfx api functions with out interactions?

mchin.1
Associate II

I am working on touchgfx LCD. I need a a support to develop our custom application.

i have seen touchgfx API functions setup screen but i need example for better understanding.

17 REPLIES 17
MM..1
Chief II
application().gotoXXXXXScreenNoTransition();

mchin.1
Associate II

Thank you but i have seen below information

switchScreen

virtual void switchScreen(Screen *newScreen)Switch to another Screen.Will call tearDownScreen on current Screen before switching, and subsequently call setupScreen and draw automatically for the new Screen.Parameters:newScreenA pointer to the new screen.

how can i use this to switch from one screen to other

virtual void switchScreen(Screen *newScreen)

mchin.1
Associate II

I am not getting this gotoScreen5ScreenNoTransition() in application.gotoScreen5ScreenNoTransition(); with out interaction.

I do not want to add interaction so at that time what should i do for screen change ?

I dont check 4.18 , but every screen have in application Base generated NoTransition goto. Check it. Interaction dummy you need only for animated transition changes.

mchin.1
Associate II

I am using 4.17.0 Base generated NoTransition goto not generated when add screen only

but generated whenvever adding screen change interaction

You check file FrontendApplicationBase.cpp?

mchin.1
Associate II

yes

i checked that file

not generated Base generated NoTransition in FrontendApplicationBase.cpp if i just add screen simply.

so How can i change screen with out this application().gotoXXXXXScreenNoTransition();. finally i got a error.

mchin.1
Associate II

i am checking Screen Transition Declarations in FrontendApplicationBase.cpp ..Is it right?

I have only one no empty screen in app no interactions and file in v 4.17

/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <new>
#include <gui_generated/common/FrontendApplicationBase.hpp>
#include <gui/common/FrontendHeap.hpp>
#include <touchgfx/transitions/NoTransition.hpp>
#include <texts/TextKeysAndLanguages.hpp>
#include <touchgfx/Texts.hpp>
#include <touchgfx/hal/HAL.hpp>
#include <platform/driver/lcd/LCD16bpp.hpp>
#include <gui/screen1_screen/Screen1View.hpp>
#include <gui/screen1_screen/Screen1Presenter.hpp>
 
using namespace touchgfx;
 
FrontendApplicationBase::FrontendApplicationBase(Model& m, FrontendHeap& heap)
    : touchgfx::MVPApplication(),
      transitionCallback(),
      frontendHeap(heap),
      model(m)
{
    touchgfx::HAL::getInstance()->setDisplayOrientation(touchgfx::ORIENTATION_LANDSCAPE);
    reinterpret_cast<touchgfx::LCD16bpp&>(touchgfx::HAL::lcd()).enableTextureMapperAll();
}
 
/*
 * Screen Transition Declarations
 */
 
// Screen1
 
void FrontendApplicationBase::gotoScreen1ScreenNoTransition()
{
    transitionCallback = touchgfx::Callback<FrontendApplicationBase>(this, &FrontendApplication::gotoScreen1ScreenNoTransitionImpl);
    pendingScreenTransitionCallback = &transitionCallback;
}
 
void FrontendApplicationBase::gotoScreen1ScreenNoTransitionImpl()
{
    touchgfx::makeTransition<Screen1View, Screen1Presenter, touchgfx::NoTransition, Model >(&currentScreen, &currentPresenter, frontendHeap, &currentTransition, &model);
}