BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Uncertainty_GUI.h
1
2// Name: BT_MatML_Uncertainty_GUI.h
3// Purpose: Classes of Uncertainty_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/statline.h>
24
25#include <boost/shared_ptr.hpp>
26#include <math.h>
27#include "StringStream.h"
28#include "matml31.hxx"
29
30#include "BT_MatML_Base_GUI.h"
31#include "BT_MatML_MatMLInfo_GUI.h"
32#include "BT_MatML_ID_GUI.h"
33
34#include "BT_MatML_GUI.h"
35#include "BT_MatML_MatMLTreeItemData.h"
36#include "BT_MatML_TreeCtrlSorted.h"
37
38
39
40namespace bellshire {
41
43 {
44 public:
45 wxNotebook* m_GUI;
46 wxTextCtrl* m_UncertaintyDistributionTypeTextCtrl;
47 wxTextCtrl* m_UncertaintyNum_Std_DevTextCtrl;
48 wxTextCtrl* m_UncertaintyPercentileTextCtrl;
49 wxTextCtrl* m_UncertaintyConfidenceLevelTextCtrl;
50 wxChoice* m_UncertaintyScaleChoice;
51
53 Uncertainty_GUI_Base(wxWindow* parent);
54 static wxNotebook* Create(wxWindow* parent, wxTextCtrl*& UncertaintyDistributionTypeTextCtrl, wxTextCtrl*& UncertaintyNum_Std_DevTextCtrl, wxTextCtrl*& UncertaintyPercentileTextCtrl, wxTextCtrl*& UncertaintyConfidenceLevelTextCtrl, wxChoice*& UncertaintyScaleChoice);
55 virtual ~Uncertainty_GUI_Base();
56
57 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
58 bool IsShown() { return m_GUI->IsShown(); };
59 wxNotebook* get() { return m_GUI; };
60
61 void Update( Uncertainty* element);
62 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
63 const wxTreeItemId& ParentId,
65 const wxTreeItemId& PreviousId
66 );
67
68 void SetConnect();
69 virtual void OnUncertaintyDistributionTypeTextCtrl(wxCommandEvent& event) { event.Skip(); }
70 virtual void OnUncertaintyNum_Std_DevTextCtrl(wxCommandEvent& event) { event.Skip(); }
71 virtual void OnUncertaintyPercentileTextCtrl(wxCommandEvent& event) { event.Skip(); }
72 virtual void OnUncertaintyConfidenceLevelTextCtrl(wxCommandEvent& event) { event.Skip(); }
73 virtual void OnUncertaintyScaleChoice(wxCommandEvent& event) { event.Skip(); }
74
75 virtual void OnInsertValue(wxCommandEvent& event){ event.Skip(); }
76 virtual void OnInsertUnits(wxCommandEvent& event){ event.Skip(); }
77 virtual void OnInsertUnitless(wxCommandEvent& event){ event.Skip(); }
78 virtual void OnInsertNotes(wxCommandEvent& event){ event.Skip(); }
79 virtual void OnInsertScale(wxCommandEvent& event){ event.Skip(); }
80
81 virtual void OnDeleteUnitless(wxCommandEvent& event) { event.Skip(); }
82 virtual void OnDeleteUnits(wxCommandEvent& event) { event.Skip(); }
83 virtual void OnDeleteValue(wxCommandEvent& event) { event.Skip(); }
84 virtual void OnDeleteNotes(wxCommandEvent& event) { event.Skip(); }
85 virtual void OnDeleteScale(wxCommandEvent& event) { event.Skip(); }
86
87 virtual void OnPasteValue(wxCommandEvent& event){ event.Skip(); }
88 virtual void OnPasteUnits(wxCommandEvent& event){ event.Skip(); }
89 virtual void OnPasteUnitless(wxCommandEvent& event){ event.Skip(); }
90 virtual void OnPasteNotes(wxCommandEvent& event){ event.Skip(); }
91 virtual void OnPasteScale(wxCommandEvent& event){ event.Skip(); }
92
93 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
94 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
95
96 private:
97 };
98
100 {
101 public:
102
103 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
104 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
105
107 Uncertainty_GUI(wxWindow* parent);
108
109 virtual ~Uncertainty_GUI();
110
111 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
112 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
113 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
114
115 //Overwrites the base class functions
116 void OnUncertaintyDistributionTypeTextCtrl(wxCommandEvent& event);
117 void OnUncertaintyNum_Std_DevTextCtrl(wxCommandEvent& event);
118 void OnUncertaintyPercentileTextCtrl(wxCommandEvent& event);
119 void OnUncertaintyConfidenceLevelTextCtrl(wxCommandEvent& event);
120 //void OnUncertaintyScaleChoice(wxCommandEvent& event); //todo
121
122 void OnInsertValue(wxCommandEvent& event);
123 void OnInsertUnits(wxCommandEvent& event);
124 void OnInsertUnitless(wxCommandEvent& event);
125 void OnInsertNotes(wxCommandEvent& event);
126 void OnInsertScale(wxCommandEvent& event);
127
128 void OnDeleteUnitless(wxCommandEvent& event);
129 void OnDeleteUnits(wxCommandEvent& event);
130 void OnDeleteValue(wxCommandEvent& event);
131 void OnDeleteNotes(wxCommandEvent& event);
132 void OnDeleteScale(wxCommandEvent& event);
133
134 void OnPasteValue(wxCommandEvent& event);
135 void OnPasteUnits(wxCommandEvent& event);
136 void OnPasteUnitless(wxCommandEvent& event);
137 void OnPasteNotes(wxCommandEvent& event);
138 void OnPasteScale(wxCommandEvent& event);
139
140 void OnBumpDown(wxCommandEvent& event);
141 void OnBumpUp(wxCommandEvent& event);
142
143 private:
144 };
145
146}; //namespace bellshire end
147
Definition: matml31.hxx:1705
Definition: matml31.hxx:3625
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_TreeCtrlSorted.h:19
Definition: BT_MatML_Uncertainty_GUI.h:43
static wxNotebook * Create(wxWindow *parent, wxTextCtrl *&UncertaintyDistributionTypeTextCtrl, wxTextCtrl *&UncertaintyNum_Std_DevTextCtrl, wxTextCtrl *&UncertaintyPercentileTextCtrl, wxTextCtrl *&UncertaintyConfidenceLevelTextCtrl, wxChoice *&UncertaintyScaleChoice)
Create the GUI for the Uncertainty MatML Data and Info
Definition: BT_MatML_Uncertainty_GUI.cpp:50
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Uncertainty &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_Uncertainty_GUI.cpp:153
Definition: BT_MatML_Uncertainty_GUI.h:100
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Uncertainty_GUI.cpp:254
Uncertainty_GUI()
Constructor for the derived class
Definition: BT_MatML_Uncertainty_GUI.cpp:226
virtual ~Uncertainty_GUI()
Destructor for the derived class
Definition: BT_MatML_Uncertainty_GUI.cpp:245
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Uncertainty_GUI.cpp:265
Contains the GUI and GUI associated classes. OnInit() calls the creation of the MaterialFrame GUI
Definition: BT_MatML_App.h:39