BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Units_GUI.h
1
2// Name: BT_MatML_Units_GUI.h
3// Purpose: Classes of Units_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/statline.h>
24
25#include <boost/shared_ptr.hpp>
26#include <math.h>
27#include "StringStream.h"
28#include "matml31.hxx"
29
30#include "BT_MatML_Base_GUI.h"
31#include "BT_MatML_MatMLInfo_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
42 {
43 public:
44 wxNotebook* m_GUI;
45 wxTextCtrl* m_UnitsSystemTextCtrl;
46 wxTextCtrl* m_UnitsFactorTextCtrl;
47 wxTextCtrl* m_UnitsNameTextCtrl;
48 wxButton* m_AutoInsertBaseUnitsButton;
49 wxTextCtrl* m_UnitsDescriptionTextCtrl;
50
52 Units_GUI_Base(wxWindow* parent);
53 static wxNotebook* Create(wxWindow* parent, wxTextCtrl*& UnitsSystemTextCtrl, wxTextCtrl*& UnitsFactorTextCtrl, wxTextCtrl*& UnitsNameTextCtrl, wxTextCtrl*& UnitsDescriptionTextCtrl);
54 virtual ~Units_GUI_Base();
55
56 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
57 bool IsShown() { return m_GUI->IsShown(); };
58 wxNotebook* get() { return m_GUI; };
59
60 void Update( Units* element);
61 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
62 const wxTreeItemId& ParentId,
64 const wxTreeItemId& PreviousId
65 );
66
67 void SetConnect();
68 virtual void OnUnitsNotebook(wxNotebookEvent& event) { event.Skip(); }
69 virtual void OnUnitsSystemTextCtrl(wxCommandEvent& event) { event.Skip(); }
70 virtual void OnUnitsFactorTextCtrl(wxCommandEvent& event) { event.Skip(); }
71 virtual void OnUnitsNameTextCtrl(wxCommandEvent& event) { event.Skip(); }
72 virtual void OnAutoInsertBaseUnitsButton(wxCommandEvent& event) { event.Skip(); }
73 virtual void OnUnitsDescriptionTextCtrl(wxCommandEvent& event) { event.Skip(); }
74
75 virtual void OnInsertUnit(wxCommandEvent& event) { event.Skip(); }
76
77 virtual void OnDeleteUnit(wxCommandEvent& event) { event.Skip(); }
78
79 virtual void OnPasteUnit(wxCommandEvent& event){ event.Skip(); }
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
91 Units_GUI();
92 Units_GUI(wxWindow* parent);
93
94 virtual ~Units_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 OnUnitsSystemTextCtrl(wxCommandEvent& event);
102 void OnUnitsFactorTextCtrl(wxCommandEvent& event);
103 void OnUnitsNameTextCtrl(wxCommandEvent& event);
104 void OnUnitsDescriptionTextCtrl(wxCommandEvent& event);
105
106 void OnInsertUnit(wxCommandEvent& event);
107
108 void OnDeleteUnit(wxCommandEvent& event);
109
110 void OnPasteUnit(wxCommandEvent& event);
111
112 private:
113 };
114
115}; //namespace bellshire end
116
Definition: matml31.hxx:1705
Definition: matml31.hxx:4002
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_TreeCtrlSorted.h:19
Definition: BT_MatML_Units_GUI.h:42
static wxNotebook * Create(wxWindow *parent, wxTextCtrl *&UnitsSystemTextCtrl, wxTextCtrl *&UnitsFactorTextCtrl, wxTextCtrl *&UnitsNameTextCtrl, wxTextCtrl *&UnitsDescriptionTextCtrl)
Create the GUI for the Units MatML Data and Info
Definition: BT_MatML_Units_GUI.cpp:57
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Units &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_Units_GUI.cpp:177
Definition: BT_MatML_Units_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_Units_GUI.cpp:267
Units_GUI()
Constructor for the derived class
Definition: BT_MatML_Units_GUI.cpp:229
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Units_GUI.cpp:257
virtual ~Units_GUI()
Destructor for the derived class
Definition: BT_MatML_Units_GUI.cpp:248
Contains the GUI and GUI associated classes. OnInit() calls the creation of the MaterialFrame GUI
Definition: BT_MatML_App.h:39