BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Name_GUI.h
1
2// Name: BT_MatML_Name_GUI.h
3// Purpose: Classes of Name_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#include <boost/shared_ptr.hpp>
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
28#include "BT_MatML_Base_GUI.h"
29#include "BT_MatML_MatMLInfo_GUI.h"
30
31#include "BT_MatML_GUI.h"
32#include "BT_MatML_MatMLTreeItemData.h"
33#include "BT_MatML_TreeCtrlSorted.h"
34
35namespace bellshire {
36
38
40 {
41 public:
42 wxNotebook* m_GUI;
43 wxTextCtrl* m_NameTextCtrl;
44 wxChoice* m_AuthorityChoice;
45 AuthorityDetails_Display_GUI* m_NameAuthorityDetails_Display_GUI;
46
48 Name_GUI_Base(wxWindow* parent);
49
50 virtual ~Name_GUI_Base();
51
52 static wxNotebook* Create(wxWindow* parent,
53 wxTextCtrl*& NameTextCtrl,
54 wxChoice*& AuthorityChoice,
55 AuthorityDetails_Display_GUI*& NameAuthorityDetails_Display_GUI
56 );
57
58 static ::std::string Label(::std::string name, ::std::string id);
59 static ::std::string LabelToId(::std::string label);
60
61 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
62 wxNotebook* get() { return m_GUI; };
63
64 void Update(Name* element, ::boost::shared_ptr<MatML_Doc> doc);
65 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
66 const wxTreeItemId& ParentId,
67 Name& Element,
68 const wxTreeItemId& PreviousId
69 );
70
71 void SetConnect();
72 virtual void OnNameTextCtrl(wxCommandEvent& event) { event.Skip(); }
73 virtual void OnNameAuthorityChoice(wxCommandEvent& event) { event.Skip(); }
74
75 private:
76 };
77
78 class Name_GUI : public Name_GUI_Base
79 {
80 public:
81
82 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
83
84 Name_GUI();
85 Name_GUI(wxWindow* parent);
86
87 virtual ~Name_GUI();
88
89 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
90 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
91
92 //Overwrites the base class functions
93 void OnNameTextCtrl(wxCommandEvent& event);
94 void OnNameAuthorityChoice(wxCommandEvent& event);
95
96 private:
97 };
98
99}; //namespace bellshire end
Definition: matml31.hxx:1705
Definition: matml31.hxx:2658
Definition: BT_MatML_AuthorityDetails_Display_GUI.h:39
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_Name_GUI.h:40
static wxNotebook * Create(wxWindow *parent, wxTextCtrl *&NameTextCtrl, wxChoice *&AuthorityChoice, AuthorityDetails_Display_GUI *&NameAuthorityDetails_Display_GUI)
Create the GUI for the Name MatML Data and Info
Definition: BT_MatML_Name_GUI.cpp:38
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Name &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_Name_GUI.cpp:148
Definition: BT_MatML_Name_GUI.h:79
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Name_GUI.cpp:223
Name_GUI()
Constructor for the derived class
Definition: BT_MatML_Name_GUI.cpp:184
virtual ~Name_GUI()
Destructor for the derived class
Definition: BT_MatML_Name_GUI.cpp:203
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Name_GUI.cpp:213
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