BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Class_GUI.h
1
2// Name: BT_MatML_Class_GUI.h
3// Purpose: Classes of Class_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
29#include "BT_MatML_GUI.h"
30#include "BT_MatML_MatMLTreeItemData.h"
31#include "BT_MatML_TreeCtrlSorted.h"
32
33namespace bellshire {
34
36 {
37 public:
38 wxNotebook* m_GUI;
39
41 Class_GUI_Base(wxWindow* parent);
42 static wxNotebook* Create(wxWindow* parent);
43 virtual ~Class_GUI_Base();
44
45 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
46 wxNotebook* get() { return m_GUI; };
47
48 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
49 const wxTreeItemId& ParentId,
50 Class& Element,
51 const wxTreeItemId& PreviousId
52 );
53 void Update( Class* element);
54
55 void SetConnect() {};
56 virtual void OnInsertName(wxCommandEvent& event) { event.Skip(); }
57 virtual void OnInsertParentMaterial(wxCommandEvent& event){ event.Skip(); }
58 virtual void OnInsertParentSubClass(wxCommandEvent& event){ event.Skip(); }
59
60 virtual void OnDeleteName(wxCommandEvent& event) { event.Skip(); }
61 virtual void OnDeleteParentMaterial(wxCommandEvent& event) { event.Skip(); }
62 virtual void OnDeleteParentSubClass(wxCommandEvent& event) { event.Skip(); }
63
64 virtual void OnPasteName(wxCommandEvent& event){ event.Skip(); }
65 virtual void OnPasteParentMaterial(wxCommandEvent& event){ event.Skip(); }
66 virtual void OnPasteParentSubClass(wxCommandEvent& event){ event.Skip(); }
67
68 virtual void OnBumpUp(wxCommandEvent& event){ event.Skip(); }
69 virtual void OnBumpDown(wxCommandEvent& event){ event.Skip(); }
70
71 private:
72 };
73
75 {
76 public:
77 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
78 ::boost::any m_MatMLItemToCopy;//Required before Paste Event Handling.
79
80 Class_GUI();
81 Class_GUI(wxWindow* parent);
82
83 virtual ~Class_GUI();
84
85 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
86 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
87 void SetMatMLItemToCopy(const ::boost::any& MatMLItemToCopy);//Required before paste Event Handling.
88
89 //Overwrites the base class functions
90 void OnInsertName(wxCommandEvent& event);
91 void OnInsertParentMaterial(wxCommandEvent& event);
92 void OnInsertParentSubClass(wxCommandEvent& event);
93
94 void OnDeleteName(wxCommandEvent& event);
95 void OnDeleteParentMaterial(wxCommandEvent& event);
96 void OnDeleteParentSubClass(wxCommandEvent& event);
97
98 void OnPasteName(wxCommandEvent& event);
99 void OnPasteParentMaterial(wxCommandEvent& event);
100 void OnPasteParentSubClass(wxCommandEvent& event);
101
102 void OnBumpUp(wxCommandEvent& event);
103 void OnBumpDown(wxCommandEvent& event);
104
105 private:
106 };
107
108}; //namespace bellshire end
Definition: matml31.hxx:897
Definition: matml31.hxx:1705
Definition: BT_MatML_Class_GUI.h:36
static wxNotebook * Create(wxWindow *parent)
Create the GUI for the Class MatML Data and Info
Definition: BT_MatML_Class_GUI.cpp:32
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Class &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_Class_GUI.cpp:82
Definition: BT_MatML_Class_GUI.h:75
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Class_GUI.cpp:173
Class_GUI()
Constructor for the derived class
Definition: BT_MatML_Class_GUI.cpp:143
virtual ~Class_GUI()
Destructor for the derived class
Definition: BT_MatML_Class_GUI.cpp:164
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Class_GUI.cpp:183
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