-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCGTeaApp.cpp
More file actions
executable file
·60 lines (50 loc) · 1.92 KB
/
CGTeaApp.cpp
File metadata and controls
executable file
·60 lines (50 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// Created by rostam on 15.10.19.
//
#include "CGTeaApp.h"
#include "CGTeaFrame.h"
#include <wx/grid.h>
#include <wx/splitter.h>
#include "CGTeaSidebar.h"
#include "gtea.xpm"
/*! \mainpage CGTea - A Brief Description.
* A mini-version of GTea written in C++ in which the view is based on wxWidget.
* The library part (Model) and the controllers need still a lot of improvements.
* For now, I am implementing the algorithms, reports, actions... based on the Java code.
* There are three main dependencies:
* - The Eigen library should be copied in the main directory.
* - wxWidget is also needed for the graphic-user interface. However, the library parts can be used without this library.
* - The boost library should be installed:
```
$ sudo apt-get to install build-essentials libboost-all-dev libmetis-dev metis
```
* \image HTML image.png
* \section Extension
* \section Downloads
*/
bool CGTeaApp::OnInit()
{
wxLog::SetLogLevel(wxLOG_Warning);
auto* frame = new CGTeaFrame("CGTea", wxPoint(100, 100), wxSize(1200, 700));
auto* splitter = new wxSplitterWindow(frame, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxSP_LIVE_UPDATE | wxSP_THIN_SASH);
splitter->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_FRAMEBK));
auto* sidebar = new CGTeaSidebar(splitter, wxID_ANY);
drawPane = new BasicDrawPane(splitter);
splitter->SplitVertically(sidebar, drawPane, 360);
splitter->SetMinimumPaneSize(180);
frame->sidebar = sidebar;
auto* mainSizer = new wxBoxSizer(wxVERTICAL);
mainSizer->Add(splitter, 1, wxEXPAND);
frame->SetSizer(mainSizer);
frame->SetAutoLayout(true);
wxBitmap iconBmp(adlpr_e3upj_0);
wxIcon icon;
icon.CopyFromBitmap(iconBmp);
frame->SetIcon(icon);
frame->Maximize(true);
frame->Show(true);
return true;
}
wxIMPLEMENT_APP(CGTeaApp);