Resolved: How to implement an event callback?
I am not a C++ programmer but learning quickly. I made good progress integrating TouchGFX 4.13.0 with STM32CubeIDE 1.2.1. Platform is STM32F746G-Discovery.
I created my own thread and that is working. Now I simply want to implement a button callback function. I have a button on Screen2 and I called the callback function Test_Button_Callback( ). I created the following code and placed it into a file named myClass.cpp
#include <gui_generated/screen2_screen/Screen2ViewBase.hpp>
#include <gui/screen2_screen/Screen2Presenter.hpp>
class Screen2View : public Screen2ViewBase
{
public:
void Test_Button_Callback()
{
int count;
count++;
}
};
The code compiles and loads. The debugger indicates that my function is "shadowing" the base function, whatever that means.
I am missing something on how to override the Screen2ViewBase virtual function. I can follow the execution in debug but it is not getting to my code.
I obviously do not know what I am doing. I have searched numerous examples and documentation and nothing helped and my head is spinning. Any help will be appreciated.