BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_ChemicalComposition_GUI.h
1
2// Name: BT_MatML_ChemicalComposition_GUI.h
3// Purpose: Classes of ChemicalComposition_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
14// For compilers that support precompilation, includes "wx/wx.h".
15#include "wx/wxprec.h"
16
17
18#ifndef WX_PRECOMP
19#include "wx/wx.h"
20#endif
21
22#include "wx/dcsvg.h"
23#include "wx/notebook.h"
24
25#include <math.h>
26#include "matml31.hxx"
27#include "BT_MatML_MatMLInfo_GUI.h"
28
29#include "BT_MatML_Base_GUI.h"
30#include "BT_MatML_GUI.h"
31#include "BT_MatML_MatMLTreeItemData.h"
32#include "BT_MatML_TreeCtrlSorted.h"
33
34
35
36namespace bellshire {
37
39 {
40 public:
41 wxNotebook* m_GUI;
42
44 ChemicalComposition_GUI_Base(wxWindow* parent);
45 static wxNotebook* Create(wxWindow* parent);
47
48 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
49 wxNotebook* get() { return m_GUI; };
50
51 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
52 const wxTreeItemId& ParentId,
54 const wxTreeItemId& PreviousId
55 );
56 void Update( ChemicalComposition* element);
57
58 void SetConnect() {};
59 virtual void OnInsertCompound(wxCommandEvent& event) { event.Skip(); }
60 virtual void OnInsertElement(wxCommandEvent& event) { event.Skip(); }
61
62 virtual void OnDeleteCompound(wxCommandEvent& event) { event.Skip(); }
63 virtual void OnDeleteElement(wxCommandEvent& event) { event.Skip(); }
64
65 virtual void OnPasteCompound(wxCommandEvent& event){ event.Skip(); }
66 virtual void OnPasteElement(wxCommandEvent& event){ event.Skip(); }
67
68 private:
69 };
70
72 {
73 public:
74 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
75 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
76
78 ChemicalComposition_GUI(wxWindow* parent);
79
81
82 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
83 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
84 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
85
86 //Overwrites the base class functions
87 void OnInsertCompound(wxCommandEvent& event);
88 void OnInsertElement(wxCommandEvent& event);
89
90 void OnDeleteCompound(wxCommandEvent& event);
91 void OnDeleteElement(wxCommandEvent& event);
92
93 void OnPasteCompound(wxCommandEvent& event);
94 void OnPasteElement(wxCommandEvent& event);
95
96 private:
97 };
98
99}; //namespace bellshire end
Definition: matml31.hxx:826
Definition: matml31.hxx:1705
Definition: BT_MatML_ChemicalComposition_GUI.h:39
static wxNotebook * Create(wxWindow *parent)
Create the GUI for the ChemicalComposition MatML Data and Info
Definition: BT_MatML_ChemicalComposition_GUI.cpp:32
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, ChemicalComposition &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_ChemicalComposition_GUI.cpp:76
Definition: BT_MatML_ChemicalComposition_GUI.h:72
virtual ~ChemicalComposition_GUI()
Destructor for the derived class
Definition: BT_MatML_ChemicalComposition_GUI.cpp:142
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_ChemicalComposition_GUI.cpp:151
ChemicalComposition_GUI()
Constructor for the derived class
Definition: BT_MatML_ChemicalComposition_GUI.cpp:120
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_ChemicalComposition_GUI.cpp:161
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