cpp-project-template
0.0.1.0
C++ Project Template
Loading...
Searching...
No Matches
App.hpp
Go to the documentation of this file.
1
10
11
#ifndef CPP_PROJ_APP
12
#define CPP_PROJ_APP
13
14
// #undef __GXX_ABI_VERSION
15
// #define __GXX_ABI_VERSION 1013 //XXX Better way to do this?
16
17
// For compilers that support precompilation, includes "wx/wx.h".
18
#include <wx/wxprec.h>
19
20
#ifndef WX_PRECOMP
21
#include <wx/wx.h>
22
#endif
23
24
#include "
MainFrame.hpp
"
25
29
namespace
cpp_proj
30
{
31
35
class
App
:
public
wxApp
36
{
37
public
:
45
bool
OnInit
()
override
;
46
47
App
();
48
~App
()
override
=
default
;
49
App
(
const
App
&) =
delete
;
50
App
&
operator=
(
const
App
&) =
delete
;
51
App
(
App
&&) =
delete
;
52
App
&
operator=
(
App
&&) =
delete
;
53
59
const
wxImage&
getLogoImg
()
const
{
return
logoImg_
; }
60
61
private
:
62
static
constexpr
int
WINDOW_POS_X
= 50;
63
static
constexpr
int
WINDOW_POS_Y
= 50;
64
static
constexpr
int
WINDOW_WIDTH
= 1200;
65
static
constexpr
int
WINDOW_HEIGHT
= 800;
66
67
static
constexpr
int
SPLASHSCREEN_DURATION_MS
= 3000;
68
69
const
wxString
logoPathRel_
=
"../images/logo.png"
;
70
71
wxString
appPath_
;
72
wxImage
logoImg_
;
73
74
// These will be deleted automatically at the end, using unique_ptr
75
// would cause segmentation fault due to doyble deletion
76
// https://docs.wxwidgets.org/trunk/overview_windowdeletion.html
77
MainFrame
*
frame_
;
78
};
79
80
}
// namespace cpp_proj
81
82
#endif
// CPP_PROJ_APP
MainFrame.hpp
This class represents the main window.
cpp_proj::App::~App
~App() override=default
cpp_proj::App::SPLASHSCREEN_DURATION_MS
static constexpr int SPLASHSCREEN_DURATION_MS
Definition
App.hpp:67
cpp_proj::App::OnInit
bool OnInit() override
The wxWidgets equivalent of a main procedure.
Definition
App.cpp:20
cpp_proj::App::operator=
App & operator=(const App &)=delete
cpp_proj::App::WINDOW_POS_Y
static constexpr int WINDOW_POS_Y
Definition
App.hpp:63
cpp_proj::App::App
App(App &&)=delete
cpp_proj::App::logoImg_
wxImage logoImg_
Definition
App.hpp:72
cpp_proj::App::WINDOW_POS_X
static constexpr int WINDOW_POS_X
Definition
App.hpp:62
cpp_proj::App::WINDOW_HEIGHT
static constexpr int WINDOW_HEIGHT
Definition
App.hpp:65
cpp_proj::App::App
App()
Definition
App.cpp:13
cpp_proj::App::WINDOW_WIDTH
static constexpr int WINDOW_WIDTH
Definition
App.hpp:64
cpp_proj::App::logoPathRel_
const wxString logoPathRel_
Definition
App.hpp:69
cpp_proj::App::App
App(const App &)=delete
cpp_proj::App::operator=
App & operator=(App &&)=delete
cpp_proj::App::getLogoImg
const wxImage & getLogoImg() const
Get the Logo Img object.
Definition
App.hpp:59
cpp_proj::App::appPath_
wxString appPath_
Definition
App.hpp:71
cpp_proj::App::frame_
MainFrame * frame_
Definition
App.hpp:77
cpp_proj::MainFrame
This class represents the main window.
Definition
MainFrame.hpp:30
cpp_proj
Namespace for this application.
Definition
UserOpt.cpp:12
src
projectwx
src
App.hpp
Generated by
1.14.0