Debian Codegraph @

src/openyahtzee.cpp

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2006-2016 by Guy Rutenberg *
3 * [email protected] *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21 // This is the main source file for the project. It includes the creation of the main window
22 // but all other stuff is done on other files.
23
24 /*
25 PREFIX and DATA_DIR are passed by the make file to the program and hold the the
26 path prefix and datadir path accordingly.
27 */
28
29 /*
30 * If PORTABLE is defined, Open Yahtzee will be compiled for the Portable Edition. Add "-DPORTABLE" to the CXXFLAGS when compiling.
31 */
32
33 #include "MainFrame.h"
34 #include <wx/wx.h>
35 // #ifdef WIN32
36 // #include openyahtzee.rc
37 // #endif
38
39
40 // Declare the application class
41 class MyApp : public wxApp
42 {
43 public:
44 // Called on application startup
45 virtual bool OnInit();
46 };
47
48 // Implements MyApp& GetApp()
49 DECLARE_APP(MyApp)
50 // Give wxWidgets the means to create a MyApp object
51 IMPLEMENT_APP(MyApp)
52 // Initialize the application
53
54 bool MyApp::OnInit()
55 {
56 //load all image handlers
57 ::wxInitAllImageHandlers();
58
59 // Create the main application window
60 main_frame::MainFrame *frame = new main_frame::MainFrame(wxT("Open Yahtzee"));
61
62 //Center the frame and show it
63 frame->Centre(true);
64 frame->Show(true);
65 return true;
66 }