BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Element_GUI.h
1
2// Name: BT_MatML_Element_GUI.h
3// Purpose: Classes of Element_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/string.h>
24
25#include <math.h>
26#include <string.h>
27#include "StringStream.h"
28
29#include "matml31.hxx"
30
31#include "BT_MatML_Base_GUI.h"
32#include "BT_MatML_MatMLInfo_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
48 Element_GUI_Base(wxWindow* parent);
49 virtual ~Element_GUI_Base();
50
51 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
52 bool IsShown() { return m_GUI->IsShown(); };
53 wxNotebook* get() { return m_GUI; };
54
55 static wxNotebook* Create(wxWindow* parent);
56 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
57 const wxTreeItemId& ParentId,
58 Element& element,
59 const wxTreeItemId& PreviousId
60 );
61 void Update( Element* element);
62
63 void SetConnect() {};
64
65 virtual void OnInsertSymbol(wxCommandEvent& event) { event.Skip(); }
66 virtual void OnInsertConcentration(wxCommandEvent& event) { event.Skip(); }
67 virtual void OnInsertNotes(wxCommandEvent& event) { event.Skip(); }
68
69 virtual void OnDeleteName(wxCommandEvent& event) { event.Skip(); }
70 virtual void OnDeleteConcentration(wxCommandEvent& event) { event.Skip(); }
71 virtual void OnDeleteNotes(wxCommandEvent& event) { event.Skip(); }
72
73 virtual void OnPasteSymbol(wxCommandEvent& event) { event.Skip(); }
74 virtual void OnPasteConcentration(wxCommandEvent& event) { event.Skip(); }
75 virtual void OnPasteNotes(wxCommandEvent& event) { event.Skip(); }
76
77 virtual void OnBumpDown(wxCommandEvent& event){ event.Skip(); }
78 virtual void OnBumpUp(wxCommandEvent& event){ event.Skip(); }
79
80
81 private:
82 };
83
85 {
86 public:
87
88 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
89 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
90
92 Element_GUI(wxWindow* parent);
93
94 virtual ~Element_GUI();
95
96 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
97 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
98 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
99
100 //Overwrites the base class functions
101 void OnInsertSymbol(wxCommandEvent& event);
102 void OnInsertConcentration(wxCommandEvent& event);
103 void OnInsertNotes(wxCommandEvent& event);
104
105 void OnDeleteName(wxCommandEvent& event);
106 void OnDeleteConcentration(wxCommandEvent& event);
107 void OnDeleteNotes(wxCommandEvent& event);
108
109 void OnPasteSymbol(wxCommandEvent& event);
110 void OnPasteConcentration(wxCommandEvent& event);
111 void OnPasteNotes(wxCommandEvent& event);
112
113 void OnBumpDown(wxCommandEvent& event);
114 void OnBumpUp(wxCommandEvent& event);
115
116 private:
117 };
118
119}; //namespace bellshire end
120#pragma once
Definition: matml31.hxx:1705
Definition: BT_MatML_Element_GUI.h:43
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Element &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_Element_GUI.cpp:85
static wxNotebook * Create(wxWindow *parent)
Create the GUI for the Element MatML Data and Info
Definition: BT_MatML_Element_GUI.cpp:32
Definition: BT_MatML_Element_GUI.h:85
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Element_GUI.cpp:169
Element_GUI()
Constructor for the derived class
Definition: BT_MatML_Element_GUI.cpp:128
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Element_GUI.cpp:159
virtual ~Element_GUI()
Destructor for the derived class
Definition: BT_MatML_Element_GUI.cpp:150
Definition: BT_MatML_Base_GUI.h:163
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