#include "../Headers/RumPiLinuxClient.h"
#include "../Headers/RumPiManagerThread.h"
#include "../Headers/GUI/MainWindow.h"

/**
* Builds the application object.
*
* @author Eddie O'Hagan
* @date 8/13/2026
*
* @code
*	//Instantiated by wxWidgets via wxIMPLEMENT_APP.
* @endcode
*/
RumPiLinuxClient::RumPiLinuxClient() : wxApp()
{

}

/**
* Destroys the application object.
*
* @author Eddie O'Hagan
* @date 8/13/2026
*
* @code
*	//Destroyed by wxWidgets at exit.
* @endcode
*/
RumPiLinuxClient::~RumPiLinuxClient()
{

}

/**
* Initializes the application: enables PNG image support and creates and shows the main window.
*
* @author Eddie O'Hagan
* @date 8/13/2026
*
* @code
*	//Called by wxWidgets on startup.
* @endcode
*
* @return True if the main window was shown successfully.
*/
bool RumPiLinuxClient::OnInit()
{
	//Allows for PNG image support.
	wxInitAllImageHandlers();

	MainWindow* theMainWindow = new MainWindow(nullptr, wxID_ANY, L"RumPi");

	return theMainWindow->Show(true);
}

wxIMPLEMENT_APP(RumPiLinuxClient);
