mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
53 lines
1.4 KiB
C++
53 lines
1.4 KiB
C++
|
/*********************************************************************
|
||
|
* Name: main.cpp
|
||
|
* Purpose: Implements simple wxWidgets application with GUI
|
||
|
* created using wxFormBuilder.
|
||
|
* Author:
|
||
|
* Created:
|
||
|
* Copyright:
|
||
|
* License: wxWidgets license (www.wxwidgets.org)
|
||
|
*
|
||
|
* Notes: Note that all GUI creation code is implemented in
|
||
|
* gui.cpp source file which is generated by wxFormBuilder.
|
||
|
*********************************************************************/
|
||
|
|
||
|
#include "main.h"
|
||
|
|
||
|
// initialize the application
|
||
|
IMPLEMENT_APP(MainApp);
|
||
|
|
||
|
////////////////////////////////////////////////////////////////////////////////
|
||
|
// application class implementation
|
||
|
////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
bool MainApp::OnInit()
|
||
|
{
|
||
|
SetTopWindow( new MainFrame( NULL ) );
|
||
|
GetTopWindow()->Show();
|
||
|
|
||
|
// true = enter the main loop
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
////////////////////////////////////////////////////////////////////////////////
|
||
|
// main application frame implementation
|
||
|
////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
MainFrame::MainFrame(wxWindow *parent) : MainFrameBase( parent )
|
||
|
{
|
||
|
}
|
||
|
|
||
|
MainFrame::~MainFrame()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void MainFrame::OnCloseFrame(wxCloseEvent& event)
|
||
|
{
|
||
|
Destroy();
|
||
|
}
|
||
|
|
||
|
void MainFrame::OnExitClick(wxCommandEvent& event)
|
||
|
{
|
||
|
Destroy();
|
||
|
}
|