BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_PropertyDetails_GUI.h
1
2// Name: BT_MatML_PropertyDetails_GUI.h
3// Purpose: Classes of PropertyDetails_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#include <wx/statline.h>
23
24#include <boost/shared_ptr.hpp>
25#include <math.h>
26#include "StringStream.h"
27#include "matml31.hxx"
28
29#include "BT_MatML_Base_GUI.h"
30#include "BT_MatML_MatMLInfo_GUI.h"
31#include "BT_MatML_ID_GUI.h"
32
33#include "BT_MatML_GUI.h"
34#include "BT_MatML_MatMLTreeItemData.h"
35#include "BT_MatML_TreeCtrlSorted.h"
36
37
38
39namespace bellshire {
40
41 class ID_GUI;
42
44 {
45 public:
46 wxNotebook* m_GUI;
47 ID_GUI* m_PropertyDetails_ID_GUI;
48 wxTextCtrl* m_PropertyDetailsTypeTextCtrl;
49
51 PropertyDetails_GUI_Base(wxWindow* parent);
52
54
55 static wxNotebook* Create(wxWindow* parent,
56 ID_GUI*& PropertyDetails_ID_GUI,
57 wxTextCtrl*& PropertyDetailsTypeTextCtrl
58 );
59
60 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
61 bool IsShown() { return m_GUI->IsShown(); };
62 wxNotebook* get() { return m_GUI; };
63
64 void Update( PropertyDetails* element);
65
66 static ::std::string Label(::std::string name, ::std::string id);
67
68 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
69 const wxTreeItemId& ParentId,
71 const wxTreeItemId& PreviousId
72 );
73
74 void SetConnect();
75 virtual void OnPropertyDetailsTypeTextCtrl(wxCommandEvent& event) { event.Skip(); }
76
77 virtual void OnInsertName(wxCommandEvent& event) { event.Skip(); }
78 virtual void OnInsertUnits(wxCommandEvent& event) { event.Skip(); }
79 virtual void OnInsertUnitless(wxCommandEvent& event) { event.Skip(); }
80 virtual void OnInsertNotes(wxCommandEvent& event) { event.Skip(); }
81
82 virtual void OnDeleteName(wxCommandEvent& event) { event.Skip(); }
83 virtual void OnDeleteUnitless(wxCommandEvent& event) { event.Skip(); }
84 virtual void OnDeleteUnits(wxCommandEvent& event) { event.Skip(); }
85 virtual void OnDeleteNotes(wxCommandEvent& event) { event.Skip(); }
86
87 virtual void OnPasteName(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
92 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
93 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
94
95 private:
96 };
97
99 {
100 public:
101
102 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
103 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
104
106 PropertyDetails_GUI(wxWindow* parent);
107
108 virtual ~PropertyDetails_GUI();
109
110 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl, ::boost::shared_ptr<MatML_Doc>& MatMLDoc);//Required before Event Handling.
111 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
112 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
113
114 //Overwrites the base class functions
115 void OnPropertyDetailsTypeTextCtrl(wxCommandEvent& event);
116
117 void OnInsertName(wxCommandEvent& event);
118 void OnInsertUnits(wxCommandEvent& event);
119 void OnInsertUnitless(wxCommandEvent& event);
120 void OnInsertNotes(wxCommandEvent& event);
121
122 void OnDeleteName(wxCommandEvent& event);
123 void OnDeleteUnitless(wxCommandEvent& event);
124 void OnDeleteUnits(wxCommandEvent& event);
125 void OnDeleteNotes(wxCommandEvent& event);
126
127 void OnPasteName(wxCommandEvent& event);
128 void OnPasteUnits(wxCommandEvent& event);
129 void OnPasteUnitless(wxCommandEvent& event);
130 void OnPasteNotes(wxCommandEvent& event);
131
132 void OnBumpDown(wxCommandEvent& event);
133 void OnBumpUp(wxCommandEvent& event);
134
135 private:
136 };
137
138}; //namespace bellshire end
139
Definition: matml31.hxx:1705
Definition: matml31.hxx:4656
Definition: BT_MatML_ID_GUI.h:78
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_PropertyDetails_GUI.h:44
static wxNotebook * Create(wxWindow *parent, ID_GUI *&PropertyDetails_ID_GUI, wxTextCtrl *&PropertyDetailsTypeTextCtrl)
Create the GUI for the PropertyDetails MatML Data and Info
Definition: BT_MatML_PropertyDetails_GUI.cpp:39
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, PropertyDetails &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_PropertyDetails_GUI.cpp:115
Definition: BT_MatML_PropertyDetails_GUI.h:99
PropertyDetails_GUI()
Constructor for the derived class
Definition: BT_MatML_PropertyDetails_GUI.cpp:174
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_PropertyDetails_GUI.cpp:202
virtual ~PropertyDetails_GUI()
Destructor for the derived class
Definition: BT_MatML_PropertyDetails_GUI.cpp:193
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_PropertyDetails_GUI.cpp:214
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