BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Material_GUI.h
1
2// Name: BT_MatML_Material_GUI.h
3// Purpose: Classes of Material_GUI Base and Derived.
4// Author: Paul McGrath
5// Modified by:
6// Created:
7// Copyright: (c) Paul McGrath
8// Licence: CC licence
10#pragma once
11
12
13// For compilers that support precompilation, includes "wx/wx.h".
14#include "wx/wxprec.h"
15
16
17#ifndef WX_PRECOMP
18#include "wx/wx.h"
19#endif
20
21#include <wx/frame.h>
22
23#include <wx/radiobut.h>
24#include "wx/dcsvg.h"
25#include "wx/notebook.h"
26
27#include <math.h>
28
29#include "matml31.hxx"
30
31#include "BT_MatML_Base_GUI.h"
32#include "BT_MatML_ID_GUI.h"
33#include "BT_MatML_MatMLInfo_GUI.h"
34
35#include "BT_MatML_GUI.h"
36#include "BT_MatML_MatMLTreeItemData.h"
37#include "BT_MatML_TreeCtrlSorted.h"
38
39
40
41
42namespace bellshire {
43
44 class ID_GUI;
45
47 {
48 public:
49 wxNotebook* m_GUI;
50 ID_GUI* m_Material_ID_GUI;
51 wxTextCtrl* m_MaterialLayersTextCtrl;
52 wxTextCtrl* m_MaterialLFORTextCtrl;
53
55 Material_GUI_Base(wxWindow* parent);
56
57 virtual ~Material_GUI_Base();
58
59 static wxNotebook* Create(wxWindow* parent, ID_GUI*& Material_ID_GUI, wxTextCtrl*& MaterialLayersTextCtrl, wxTextCtrl*& MaterialLFORTextCtrl);
60
61 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); return; };
62 wxNotebook* get() { return m_GUI; };
63
64 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
65 const wxTreeItemId& ParentId,
67 const wxTreeItemId& PreviousId
68 );
70 static wxTreeItemId SetupBranch(TreeCtrlSorted*& MatMLTreeCtrl, wxWindow*& ParentId, MatML_Doc& Element, std::vector<Material*>& materials);
71 void Update( Material* element);
72
73 void SetConnect();
74 virtual void OnMaterialLayersTextCtrl(wxCommandEvent& event) { event.Skip(); }
75 virtual void OnMaterialLFORTextCtrl(wxCommandEvent& event) { event.Skip(); }
76
77 virtual void OnInsertMaterial(wxCommandEvent& event) { event.Skip(); }
78 virtual void OnInsertBulkDetails(wxCommandEvent& event){ event.Skip(); }
79 virtual void OnInsertComponentDetails(wxCommandEvent& event){ event.Skip(); }
80 virtual void OnInsertGraphs(wxCommandEvent& event){ event.Skip(); }
81 virtual void OnInsertGlossary(wxCommandEvent& event) { event.Skip(); }
82
83 virtual void OnDeleteBulkDetails(wxCommandEvent& event) { event.Skip(); }
84 virtual void OnDeleteComponentDetails(wxCommandEvent& event) { event.Skip(); }
85 virtual void OnDeleteGraphs(wxCommandEvent& event) { event.Skip(); }
86 virtual void OnDeleteGlossary(wxCommandEvent& event) { event.Skip(); }
87
88 virtual void OnPasteBulkDetails(wxCommandEvent& event) { event.Skip(); }
89 virtual void OnPasteComponentDetails(wxCommandEvent& event) { event.Skip(); }
90 virtual void OnPasteGraphs(wxCommandEvent& event) { event.Skip(); }
91 virtual void OnPasteGlossary(wxCommandEvent& event) { event.Skip(); }
92
93 virtual void OnCopyMaterial(wxCommandEvent& event) { event.Skip(); }
94
95 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
96 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
97
98 private:
99 };
100
102 {
103 public:
104
105 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
106 ::boost::shared_ptr<MatML_Doc> m_MatMLDoc;//Required before Event Handling.
107 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
108
109 Material_GUI();
110 Material_GUI(wxWindow* parent);
111
112 virtual ~Material_GUI();
113
114 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl, ::boost::shared_ptr<MatML_Doc>& MatMLDoc);//Required before Event Handling.
115 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
116 void SetMatMLDoc(::boost::shared_ptr<MatML_Doc>& MatMLDoc);
117 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
118
119 //Overwrites the base class functions
120 void OnMaterialLayersTextCtrl(wxCommandEvent& event);
121 void OnMaterialLFORTextCtrl(wxCommandEvent& event);
122
123 void OnInsertMaterial(wxCommandEvent& event);
124 void OnInsertBulkDetails(wxCommandEvent& event);
125 void OnInsertComponentDetails(wxCommandEvent& event);
126 void OnInsertGraphs(wxCommandEvent& event);
127 void OnInsertGlossary(wxCommandEvent& event);
128
129 void OnDeleteBulkDetails(wxCommandEvent& event);
130 void OnDeleteComponentDetails(wxCommandEvent& event);
131 void OnDeleteGraphs(wxCommandEvent& event);
132 void OnDeleteGlossary(wxCommandEvent& event);
133
134 void OnPasteBulkDetails(wxCommandEvent& event);
135 void OnPasteComponentDetails(wxCommandEvent& event);
136 void OnPasteGraphs(wxCommandEvent& event);
137 void OnPasteGlossary(wxCommandEvent& event);
138
139 void OnCopyMaterial(wxCommandEvent& event);
140
141 void OnBumpDown(wxCommandEvent& event);
142 void OnBumpUp(wxCommandEvent& event);
143
144 private:
145 };
146
147}; //namespace bellshire end
Definition: matml31.hxx:1705
Definition: matml31.hxx:5577
Definition: matml31.hxx:2299
Definition: BT_MatML_ID_GUI.h:78
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_Material_GUI.h:47
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Material &Element, const wxTreeItemId &PreviousId)
This sets up the Parent MatML Data into a wxTreeCtrl element and then call on the Children to do the ...
Definition: BT_MatML_Material_GUI.cpp:137
static wxTreeItemId SetupBranch(TreeCtrlSorted *&MatMLTreeCtrl, wxWindow *&ParentId, MatML_Doc &Element, std::vector< Material * > &materials)
This set-up the Parent MatML Data into a wxTreeCtrl element and then call on the Children to do the s...
Definition: BT_MatML_Material_GUI.cpp:261
void SetConnect()
Set up the connect between the MatML_GUI and the functions
Definition: BT_MatML_Material_GUI.cpp:309
static wxNotebook * Create(wxWindow *parent, ID_GUI *&Material_ID_GUI, wxTextCtrl *&MaterialLayersTextCtrl, wxTextCtrl *&MaterialLFORTextCtrl)
Create GUI for the Material MatML Data and Info. Static function
Definition: BT_MatML_Material_GUI.cpp:47
void Update(Material *element)
Updates the MatML_GUI from the MatML element
Definition: BT_MatML_Material_GUI.cpp:104
void ReplaceIDwithUuid(MatML_Doc &doc)
This was used only to make the old data format compatible with the new arrangement
Definition: BT_MatML_Material_GUI.cpp:201
Material_GUI_Base()
Constructor for the base class
Definition: BT_MatML_Material_GUI.cpp:10
Definition: BT_MatML_Material_GUI.h:102
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Material_GUI.cpp:361
Material_GUI()
Constructor for the derived class
Definition: BT_MatML_Material_GUI.cpp:320
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl, ::boost::shared_ptr< MatML_Doc > &MatMLDoc)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Material_GUI.cpp:348
virtual ~Material_GUI()
Destructor for the derived class
Definition: BT_MatML_Material_GUI.cpp:339
void SetMatMLDoc(::boost::shared_ptr< MatML_Doc > &MatMLDoc)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Material_GUI.cpp:371
Definition: BT_MatML_TreeCtrlSorted.h:19
Contains the GUI and GUI associated classes. OnInit() calls the creation of the MaterialFrame GUI
Definition: BT_MatML_App.h:39