5
cbeam_gui 0.3.6 07/2010 G.P.L.
7
this is a small frontend for the cbeam_class (continuous beam analysis)
8
cbeam_class has to be included
10
This program is free software: you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation, either version 3 of the License, or
13
(at your option) any later version.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
20
You should have received a copy of the GNU General Public License
21
along with this program. If not, see <http://www.gnu.org/licenses/>.
29
#include <wx/notebook.h>
30
#include <wx/imaglist.h>
32
#include <wx/filename.h>
33
#include <wx/textfile.h>
37
#include "cbeam_class.h"
38
#include "cbaGUI_dialogs.h"
39
#include "cbaGUI_drawings.h"
40
#include "cbaGUI_bitmaps.h"
43
//--------------- MainApp ---------------
45
class MainApp: public wxApp
47
virtual bool OnInit();
53
//--------------- MainFrame ---------------
54
class MainFrame: public wxFrame
58
MainFrame(const wxString& title);
60
int Draw(wxDC&, wxRect, int);
66
void CreateGUIControls();
68
void OnQuit(wxCommandEvent&);
69
void OnInfo(wxCommandEvent&);
70
void OnNewBeam(wxCommandEvent&);
71
void OnOpenFile(wxCommandEvent&);
72
void OnSaveInput(wxCommandEvent&);
73
void OnSettings(wxCommandEvent&);
74
void SetDefaults(wxArrayString);
76
void OnSpanAdd(wxCommandEvent&);
77
void OnSpanDel(wxCommandEvent&);
78
void OnSetEI(wxCommandEvent&);
79
void SetMatSec(wxArrayString);
80
void OnSetRst(wxCommandEvent&);
82
void OnLoadAdd(wxCommandEvent&);
83
void OnLoadDel(wxCommandEvent&);
84
void OnSetLF(wxCommandEvent&);
85
void OnChkSw(wxCommandEvent&);
87
void OnClipRes(wxCommandEvent&);
88
void OnSaveRes(wxCommandEvent&);
89
void OnPrint(wxCommandEvent&);
91
void OnSysPage(wxNotebookEvent&);
92
void OnLoadPage(wxNotebookEvent&);
93
void OnRadioButton(wxCommandEvent&);
94
void OnCellInputGrid(wxGridEvent&);
97
vector< vector<double> > ReadInput();
98
void UpdateResultText(wxArrayString, wxArrayString, wxString);
99
wxArrayString lmSort(vector< vector<double> >);
100
wxArrayString resOut(vector< vector<double> >, vector< vector <double> >) ;
101
wxString strOut(vector< vector<double> >);
102
wxArrayString CreatePlotTable();
104
void FillInputGrids();
105
void addCols(wxGrid*, int);
107
wxString ChkValue(wxString valStr);
109
wxGrid *udl_Grid, *pl_Grid, *pudl_Grid, *ml_Grid, *tz_Grid, *ptr_Grid;
111
wxNotebook *NbInp, *NbRes;
114
wxButton *BtLdAdd, *BtLdDel, *BtLdFac;
115
wxButton *BtEI, *BtRst, *BtSpAdd, *BtSpDel;
118
wxBitmapButton *BtCopy, *BtSave, *BtPrint;
119
wxRadioButton *BtFc, *BtSt;
121
GraphFrame *system, *graph;
134
vector< vector<double> > LMg;
135
vector< vector<double> > LMq;
137
wxArrayString resTxt;
140
wxString dbMat, dbSec;
141
wxString fcUnit, lnUnit;
152
ID_QUIT = wxID_HIGHEST,
189
//---------------- declare the main frame -------------------------
193
//---------------- PrintFrame -------------------------
195
class PrintFrame: public wxPrintout
199
PrintFrame(const wxChar *title = _T("cba")) : wxPrintout(title) {}
200
virtual ~PrintFrame() {}
202
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
203
bool HasPage(int page);
204
bool OnBeginDocument(int startPage, int endPage);
205
bool OnPrintPage(int page);