BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_SpecimenDetails_GUI.h
1
2// Name: BT_MatML_SpecimenDetails_GUI.h
3// Purpose: Classes of SpecimenDetails_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
42 class ID_GUI;
43
45 {
46 public:
47 wxNotebook* m_GUI;
48 ID_GUI* m_SpecimenDetails_ID_GUI;
49 wxTextCtrl* m_SpecimenDetailsTypeTextCtrl;
50
52 SpecimenDetails_GUI_Base(wxWindow* parent);
53
55
56 static wxNotebook* Create(wxWindow* parent,
57 ID_GUI*& SpecimenDetails_ID_GUI,
58 wxTextCtrl*& SpecimenDetailsTypeTextCtrl
59 );
60
61 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
62 bool IsShown() { return m_GUI->IsShown(); };
63 wxNotebook* get() { return m_GUI; };
64
65 void Update( SpecimenDetails* element);
66
67 static ::std::string Label(::std::string name, ::std::string id);
68
69 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
70 const wxTreeItemId& ParentId,
72 const wxTreeItemId& PreviousId
73 );
74
75 void SetConnect();
76 virtual void OnSpecimenDetailsTypeTextCtrl(wxCommandEvent& event) { event.Skip(); }
77
78 virtual void OnInsertName(wxCommandEvent& event){ event.Skip(); }
79 virtual void OnInsertNotes(wxCommandEvent& event){ event.Skip(); }
80 virtual void OnInsertGeometry(wxCommandEvent& event){ event.Skip(); }
81
82 virtual void OnDeleteName(wxCommandEvent& event) { event.Skip(); }
83 virtual void OnDeleteGeometry(wxCommandEvent& event) { event.Skip(); }
84 virtual void OnDeleteNotes(wxCommandEvent& event){event.Skip(); }
85
86 virtual void OnPasteName(wxCommandEvent& event){event.Skip(); }
87 virtual void OnPasteNotes(wxCommandEvent& event){event.Skip(); }
88 virtual void OnPasteGeometry(wxCommandEvent& event){event.Skip(); }
89
90 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
91 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
92
93 private:
94 };
95
97 {
98 public:
99
100 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
101 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
102
104 SpecimenDetails_GUI(wxWindow* parent);
105 virtual ~SpecimenDetails_GUI();
106
107 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl, ::boost::shared_ptr<MatML_Doc>& MatMLDoc);//Required before Event Handling.
108 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
109 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
110
111 //Overwrites the base class functions
112 void OnSpecimenDetailsTypeTextCtrl(wxCommandEvent& event);
113
114 void OnInsertName(wxCommandEvent& event);
115 void OnInsertNotes(wxCommandEvent& event);
116 void OnInsertGeometry(wxCommandEvent& event);
117
118 void OnDeleteName(wxCommandEvent& event);
119 void OnDeleteGeometry(wxCommandEvent& event);
120 void OnDeleteNotes(wxCommandEvent& event);
121
122 void OnPasteName(wxCommandEvent& event);
123 void OnPasteNotes(wxCommandEvent& event);
124 void OnPasteGeometry(wxCommandEvent& event);
125
126 void OnBumpDown(wxCommandEvent& event);
127 void OnBumpUp(wxCommandEvent& event);
128
129 private:
130 };
131
132}; //namespace bellshire end
133
Definition: matml31.hxx:1705
Definition: matml31.hxx:4938
Definition: BT_MatML_ID_GUI.h:78
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_SpecimenDetails_GUI.h:45
static wxNotebook * Create(wxWindow *parent, ID_GUI *&SpecimenDetails_ID_GUI, wxTextCtrl *&SpecimenDetailsTypeTextCtrl)
Create the GUI for the SpecimenDetails MatML Data and Info
Definition: BT_MatML_SpecimenDetails_GUI.cpp:31
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, SpecimenDetails &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_SpecimenDetails_GUI.cpp:107
Definition: BT_MatML_SpecimenDetails_GUI.h:97
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_SpecimenDetails_GUI.cpp:203
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_SpecimenDetails_GUI.cpp:191
SpecimenDetails_GUI()
Constructor for the derived class
Definition: BT_MatML_SpecimenDetails_GUI.cpp:163
virtual ~SpecimenDetails_GUI()
Destructor for the derived class
Definition: BT_MatML_SpecimenDetails_GUI.cpp:182
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