I'm very new to WxWidgets. I need to use some non-Wx, non-gui classes of my own, to do some processing.
I'm not sure the best way to do it. Clicking a button starts the processing, so I declared my non-Wx class in the header file for the button's frame. The frame has my object as a data member. Then in the OnQuit handler, I call the object's method. (The OnQuit isn't significant. I'm just borrowing the code from one of the simple tutorials to test this.)
Code: Select all
class NonWxObject
{
public:
void say_hello();
};
class Button : public wxFrame
{
private:
NonWxObject thing;
public:
Button(const wxString& title);
void OnQuit(wxCommandEvent& event);
};
By the way, I've searched for info on scope in WxWidgets and haven't found any yet. Is WxWidgets scope different than C++?
I've posted all the code here:
https://pastebin.com/pknZ5Fh8
I'd be grateful for any suggestions.