BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_ParameterValue_GUI.h
1
2// Name: BT_MatML_ParameterValue_GUI.h
3// Purpose: Classes of ParameterValue_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// For compilers that support precompilation, includes "wx/wx.h".
13#include "wx/wxprec.h"
14
15
16#ifndef WX_PRECOMP
17#include "wx/wx.h"
18#endif
19
20#include "wx/dcsvg.h"
21#include "wx/notebook.h"
22
23#include <math.h>
24#include "StringStream.h"
25#include <boost/shared_ptr.hpp>
26#include "matml31.hxx"
27
28#include "BT_MatML_Base_GUI.h"
29#include "BT_MatML_MatMLInfo_GUI.h"
30#include "BT_MatML_ID_GUI.h"
31
32#include "BT_MatML_GUI.h"
33#include "BT_MatML_MatMLTreeItemData.h"
34#include "BT_MatML_TreeCtrlSorted.h"
35
36
37
38namespace bellshire {
39
41
43 {
44 public:
45 wxNotebook* m_GUI;
46 wxChoice* m_ParameterValueParameterChoice;
47 wxChoice* m_ParameterValueFormatChoice;
48 ParameterDetails_Display_GUI* m_ParameterValueParameterDetails_Display_GUI;
49
51 ParameterValue_GUI_Base(wxWindow* parent);
52 static wxNotebook* Create(wxWindow* parent, wxChoice*& ParameterValueParameterChoice, wxChoice*& ParameterValueFormatChoice, ParameterDetails_Display_GUI*& ParameterValueParameterDetails_Display_GUI);
54
55 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
56 wxNotebook* get() { return m_GUI; };
57
58 void Update( ParameterValue* element, const boost::shared_ptr<MatML_Doc> doc);
59
60 static ::std::string Label(::std::string name, ::std::string id);
61 static ::std::string LabelToId(::std::string label);
62
63 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
64 const wxTreeItemId& ParentId,
66 const wxTreeItemId& PreviousId
67 );
68
69 void SetConnect();
70 virtual void OnParameterValueParameterChoice(wxCommandEvent& event) { event.Skip(); }
71 virtual void OnParameterValueFormatChoice(wxCommandEvent& event) { event.Skip(); }
72
73 virtual void OnInsertData(wxCommandEvent& event) { event.Skip(); }
74 virtual void OnInsertUncertainty(wxCommandEvent& event) { event.Skip(); }
75 virtual void OnInsertQualifier(wxCommandEvent& event) { event.Skip(); }
76 virtual void OnInsertNotes(wxCommandEvent& event) { event.Skip(); }
77
78 virtual void OnDeleteQualifier(wxCommandEvent& event) { event.Skip(); }
79 virtual void OnDeleteNotes(wxCommandEvent& event) { event.Skip(); }
80 virtual void OnDeleteUncertainty(wxCommandEvent& event) { event.Skip(); }
81
82 virtual void OnPasteData(wxCommandEvent& event) { event.Skip(); }
83 virtual void OnPasteUncertainty(wxCommandEvent& event) { event.Skip(); }
84 virtual void OnPasteQualifier(wxCommandEvent& event) { event.Skip(); }
85 virtual void OnPasteNotes(wxCommandEvent& event) { event.Skip(); }
86
87 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
88 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
89
90 private:
91 };
92
94 {
95 public:
96
97 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
98 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
99
101 ParameterValue_GUI(wxWindow* parent);
102
103 virtual ~ParameterValue_GUI();
104
105 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
106 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
107 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
108
109 //Overwrites the base class functions
110 void OnParameterValueParameterChoice(wxCommandEvent& event);
111 void OnParameterValueFormatChoice(wxCommandEvent& event);
112
113 void OnInsertData(wxCommandEvent& event);
114 void OnInsertUncertainty(wxCommandEvent& event);
115 void OnInsertQualifier(wxCommandEvent& event);
116 void OnInsertNotes(wxCommandEvent& event);
117
118 void OnDeleteQualifier(wxCommandEvent& event);
119 void OnDeleteNotes(wxCommandEvent& event);
120 void OnDeleteUncertainty(wxCommandEvent& event);
121
122 void OnPasteData(wxCommandEvent& event);
123 void OnPasteUncertainty(wxCommandEvent& event);
124 void OnPasteQualifier(wxCommandEvent& event);
125 void OnPasteNotes(wxCommandEvent& event);
126
127 void OnBumpDown(wxCommandEvent& event);
128 void OnBumpUp(wxCommandEvent& event);
129
130
131 private:
132 };
133
134}; //namespace bellshire end
Definition: matml31.hxx:1705
Definition: matml31.hxx:2759
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_ParameterDetails_Display_GUI.h:43
Definition: BT_MatML_ParameterValue_GUI.h:43
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, ParameterValue &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_ParameterValue_GUI.cpp:168
static wxNotebook * Create(wxWindow *parent, wxChoice *&ParameterValueParameterChoice, wxChoice *&ParameterValueFormatChoice, ParameterDetails_Display_GUI *&ParameterValueParameterDetails_Display_GUI)
Create the GUI for the ParameterValue MatML Data and Info
Definition: BT_MatML_ParameterValue_GUI.cpp:36
Definition: BT_MatML_ParameterValue_GUI.h:94
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_ParameterValue_GUI.cpp:270
virtual ~ParameterValue_GUI()
Destructor for the derived class
Definition: BT_MatML_ParameterValue_GUI.cpp:249
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_ParameterValue_GUI.cpp:260
ParameterValue_GUI()
Constructor for the derived class
Definition: BT_MatML_ParameterValue_GUI.cpp:232
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