BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_PropertyData_GUI.h
1
2// Name: BT_MatML_PropertyData_GUI.h
3// Purpose: Classes of PropertyData_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/dcsvg.h"
22#include "wx/notebook.h"
23#include <wx/grid.h>
24
25#include <boost/shared_ptr.hpp>
26#include <math.h>
27#include <list>
28#include "StringStream.h"
29#include "matml31.hxx"
30
31#include "BT_MatML_Base_GUI.h"
32#include "BT_MatML_GUI.h"
33#include "BT_MatML_MatMLTreeItemData.h"
34#include "BT_MatML_TreeCtrlSorted.h"
35
36
37
38namespace bellshire {
39
45
47 {
48 public:
49 wxNotebook* m_GUI;
50 wxChoice* m_PropertyDataPropertiesChoice;
51 wxChoice* m_PropertyDataTechniqueChoice;
52 wxChoice* m_PropertyDataSourceChoice;
53 wxChoice* m_PropertyDataSpecimenChoice;
54 wxChoice* m_PropertyDataTestChoice;
55 wxTextCtrl* m_PropertyDataDelimiterTextCtrl;
56 wxTextCtrl* m_PropertyDataQuoteTextCtrl;
57 PropertyDetails_Display_GUI* m_PropertyDataPropertyDetails_Display_GUI;
58 MeasurementTechniqueDetails_Display_GUI* m_PropertyDataMeasurementTechniqueDetails_Display_GUI;
59 DataSourceDetails_Display_GUI* m_PropertyDataDataSourceDetails_Display_GUI;
60 SpecimenDetails_Display_GUI* m_PropertyDataSpecimenDetails_Display_GUI;
61 TestConditionDetails_Display_GUI* m_PropertyDataTestConditionDetails_Display_GUI;
62
64 PropertyData_GUI_Base(wxWindow* parent);
65
66 virtual ~PropertyData_GUI_Base();
67
68 static wxNotebook* Create(wxWindow* parent,
69 wxChoice*& PropertyDataPropertiesChoice,
70 wxChoice*& PropertyDataTechniqueChoice,
71 wxChoice*& PropertyDataSourceChoice,
72 wxChoice*& PropertyDataSpecimenChoice,
73 wxChoice*& PropertyDataTestChoice,
74 wxTextCtrl*& PropertyDataDelimiterTextCtrl,
75 wxTextCtrl*& PropertyDataQuoteTextCtrl,
76 PropertyDetails_Display_GUI*& PropertyDataPropertyDetails_Display_GUI,
77 MeasurementTechniqueDetails_Display_GUI*& PropertyDataMeasurementTechniqueDetails_Display_GUI,
78 DataSourceDetails_Display_GUI*& PropertyDataDataSourceDetails_Display_GUI,
79 SpecimenDetails_Display_GUI*& PropertyDataSpecimenDetails_Display_GUI,
80 TestConditionDetails_Display_GUI*& PropertyTestConditionDetails_Display_GUI
81 );
82
83 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
84 bool IsShown() { return m_GUI->IsShown(); };
85 wxNotebook* get() { return m_GUI; };
86
87 void Update( PropertyData* element, const ::boost::shared_ptr<MatML_Doc> doc);
88
89 static ::std::string Label(::std::string name, ::std::string id);
90 static ::std::string LabelToId(::std::string label);
91
92 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
93 const wxTreeItemId& ParentId,
95 const wxTreeItemId& PreviousId
96 );
97
98 void SetConnect();
99 virtual void OnPropertyDataPropertiesChoice(wxCommandEvent& event) { event.Skip(); }
100 virtual void OnPropertyDataTechniqueChoice(wxCommandEvent& event) { event.Skip(); }
101 virtual void OnPropertyDataSourceChoice(wxCommandEvent& event) { event.Skip(); }
102 virtual void OnPropertyDataSpecimenChoice(wxCommandEvent& event) { event.Skip(); }
103 virtual void OnPropertyDataTestChoice(wxCommandEvent& event) { event.Skip(); }
104 virtual void OnPropertyDataDelimiterTextCtrl(wxCommandEvent& event) { event.Skip(); }
105 virtual void OnPropertyDataQuoteTextCtrl(wxCommandEvent& event) { event.Skip(); }
106
107 virtual void OnInsertData(wxCommandEvent& event){ event.Skip(); }
108 virtual void OnInsertUncertainty(wxCommandEvent& event){ event.Skip(); }
109 virtual void OnInsertQualifier(wxCommandEvent& event){ event.Skip(); }
110 virtual void OnInsertParameterValue(wxCommandEvent& event){ event.Skip(); }
111 virtual void OnInsertNotes(wxCommandEvent& event){ event.Skip(); }
112
113 virtual void OnDeleteNotes(wxCommandEvent& event) { event.Skip(); }
114 virtual void OnDeleteParameterValue(wxCommandEvent& event) { event.Skip(); }
115 virtual void OnDeleteQualifier(wxCommandEvent& event) { event.Skip(); }
116 virtual void OnDeleteUncertainty(wxCommandEvent& event) { event.Skip(); }
117
118 virtual void OnPasteData(wxCommandEvent& event) { event.Skip(); }
119 virtual void OnPasteUncertainty(wxCommandEvent& event) { event.Skip(); }
120 virtual void OnPasteQualifier(wxCommandEvent& event) { event.Skip(); }
121 virtual void OnPasteParameterValue(wxCommandEvent& event) { event.Skip(); }
122 virtual void OnPasteNotes(wxCommandEvent& event) { event.Skip(); }
123
124 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
125 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
126
127 private:
128 };
129
131 {
132 public:
133
134 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
135 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
136
138 PropertyData_GUI(wxWindow* parent);
139
140 virtual ~PropertyData_GUI();
141
142 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
143 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
144 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
145
146 //Overwrites the base class functions
147 void OnPropertyDataPropertiesChoice(wxCommandEvent& event);
148 void OnPropertyDataTechniqueChoice(wxCommandEvent& event);
149 void OnPropertyDataSourceChoice(wxCommandEvent& event);
150 void OnPropertyDataSpecimenChoice(wxCommandEvent& event);
151 void OnPropertyDataTestChoice(wxCommandEvent& event);
152 void OnPropertyDataDelimiterTextCtrl(wxCommandEvent& event);
153 void OnPropertyDataQuoteTextCtrl(wxCommandEvent& event);
154
155 void OnInsertData(wxCommandEvent& event);
156 void OnInsertUncertainty(wxCommandEvent& event);
157 void OnInsertQualifier(wxCommandEvent& event);
158 void OnInsertParameterValue(wxCommandEvent& event);
159 void OnInsertNotes(wxCommandEvent& event);
160
161 void OnDeleteNotes(wxCommandEvent& event);
162 void OnDeleteParameterValue(wxCommandEvent& event);
163 void OnDeleteQualifier(wxCommandEvent& event);
164 void OnDeleteUncertainty(wxCommandEvent& event);
165
166 void OnPasteData(wxCommandEvent& event);
167 void OnPasteUncertainty(wxCommandEvent& event);
168 void OnPasteQualifier(wxCommandEvent& event);
169 void OnPasteParameterValue(wxCommandEvent& event);
170 void OnPasteNotes(wxCommandEvent& event);
171
172 void OnBumpUp(wxCommandEvent& event);
173 void OnBumpDown(wxCommandEvent& event);
174
175 private:
176 };
177
178}; //namespace bellshire end
179
Definition: matml31.hxx:1705
Definition: matml31.hxx:3146
Definition: BT_MatML_DataSourceDetails_Display_GUI.h:44
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_MeasurementTechniqueDetails_Display_GUI.h:43
Definition: BT_MatML_PropertyData_GUI.h:47
static wxNotebook * Create(wxWindow *parent, wxChoice *&PropertyDataPropertiesChoice, wxChoice *&PropertyDataTechniqueChoice, wxChoice *&PropertyDataSourceChoice, wxChoice *&PropertyDataSpecimenChoice, wxChoice *&PropertyDataTestChoice, wxTextCtrl *&PropertyDataDelimiterTextCtrl, wxTextCtrl *&PropertyDataQuoteTextCtrl, PropertyDetails_Display_GUI *&PropertyDataPropertyDetails_Display_GUI, MeasurementTechniqueDetails_Display_GUI *&PropertyDataMeasurementTechniqueDetails_Display_GUI, DataSourceDetails_Display_GUI *&PropertyDataDataSourceDetails_Display_GUI, SpecimenDetails_Display_GUI *&PropertyDataSpecimenDetails_Display_GUI, TestConditionDetails_Display_GUI *&PropertyTestConditionDetails_Display_GUI)
Create the GUI for the PropertyData MatML Data and Info.
Definition: BT_MatML_PropertyData_GUI.cpp:71
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, PropertyData &Element, const wxTreeItemId &PreviousId)
This set-up the Parent MatML Data into a wxTreeCtrl element and then call on the Children to do the s...
Definition: BT_MatML_PropertyData_GUI.cpp:379
Definition: BT_MatML_PropertyData_GUI.h:131
PropertyData_GUI()
Constructor for the derived class
Definition: BT_MatML_PropertyData_GUI.cpp:490
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_PropertyData_GUI.cpp:518
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_PropertyData_GUI.cpp:529
virtual ~PropertyData_GUI()
Destructor for the derived class
Definition: BT_MatML_PropertyData_GUI.cpp:509
Definition: BT_MatML_PropertyDetails_Display_GUI.h:43
Definition: BT_MatML_SpecimenDetails_Display_GUI.h:44
Definition: BT_MatML_TestConditionDetails_Display_GUI.h:44
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