BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Compound_GUI.h
1
2// Name: BT_MatML_Compound_GUI.h
3// Purpose: Classes of Compound_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 "matml31.hxx"
25
26#include "BT_MatML_Base_GUI.h"
27#include "BT_MatML_MatMLInfo_GUI.h"
28#include "BT_MatML_ID_GUI.h"
29
30#include "BT_MatML_GUI.h"
31#include "BT_MatML_MatMLTreeItemData.h"
32#include "BT_MatML_TreeCtrlSorted.h"
33
34namespace bellshire {
35
37 {
38 public:
39 wxNotebook* m_GUI;
40
42 Compound_GUI_Base(wxWindow* parent);
43 static wxNotebook* Create(wxWindow* parent);
44 virtual ~Compound_GUI_Base();
45
46 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
47 bool IsShown() { return m_GUI->IsShown(); };
48 wxNotebook* get() { return m_GUI; };
49
50 void Update( Compound* element);
51 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
52 const wxTreeItemId& ParentId,
54 const wxTreeItemId& PreviousId
55 );
56
57 void SetConnect() {};
58
59 virtual void OnInsertElement(wxCommandEvent& event) { event.Skip(); }
60 virtual void OnInsertConcentration(wxCommandEvent& event) { event.Skip(); }
61 virtual void OnInsertNotes(wxCommandEvent& event) { event.Skip(); }
62
63 virtual void OnDeleteElement(wxCommandEvent& event) { event.Skip(); }
64 virtual void OnDeleteConcentration(wxCommandEvent& event) { event.Skip(); }
65 virtual void OnDeleteNotes(wxCommandEvent& event) { event.Skip(); }
66
67 virtual void OnPasteElement(wxCommandEvent& event) { event.Skip(); }
68 virtual void OnPasteConcentration(wxCommandEvent& event) { event.Skip(); }
69 virtual void OnPasteNotes(wxCommandEvent& event) { event.Skip(); }
70
71 virtual void OnBumpDown(wxCommandEvent& event) { event.Skip(); }
72 virtual void OnBumpUp(wxCommandEvent& event) { event.Skip(); }
73 private:
74 };
75
77 {
78 public:
79 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
80 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
81
83 Compound_GUI(wxWindow* parent);
84
85 virtual ~Compound_GUI();
86
87 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
88 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
89 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
90
91 //Overwrites the base class functions
92 void OnInsertElement(wxCommandEvent& event);
93 void OnInsertConcentration(wxCommandEvent& event);
94 void OnInsertNotes(wxCommandEvent& event);
95
96 void OnDeleteElement(wxCommandEvent& event);
97 void OnDeleteConcentration(wxCommandEvent& event);
98 void OnDeleteNotes(wxCommandEvent& event);
99
100 void OnPasteElement(wxCommandEvent& event);
101 void OnPasteConcentration(wxCommandEvent& event);
102 void OnPasteNotes(wxCommandEvent& event);
103
104 void OnBumpDown(wxCommandEvent& event);
105 void OnBumpUp(wxCommandEvent& event);
106
107 private:
108 };
109
110}; //namespace bellshire end
111#pragma once
Definition: matml31.hxx:1259
Definition: matml31.hxx:1705
Definition: BT_MatML_Compound_GUI.h:37
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Compound &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_Compound_GUI.cpp:73
static wxNotebook * Create(wxWindow *parent)
Create the GUI for the Compound MatML Data and Info
Definition: BT_MatML_Compound_GUI.cpp:29
Definition: BT_MatML_Compound_GUI.h:77
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Compound_GUI.cpp:152
virtual ~Compound_GUI()
Destructor for the derived class
Definition: BT_MatML_Compound_GUI.cpp:144
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Compound_GUI.cpp:162
Compound_GUI()
Constructor for the derived class
Definition: BT_MatML_Compound_GUI.cpp:122
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