BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_Source_GUI.h
1
2// Name: BT_MatML_Source_GUI.h
3// Purpose: Classes of Source_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
37namespace bellshire {
38
40
42 {
43 public:
44 wxNotebook* m_GUI;
45 wxChoice* m_SourceChoice;
46 SourceDetails_Display_GUI* m_SourceSourceDetails_Display_GUI;
47
49 Source_GUI_Base(wxWindow* parent);
50
51 virtual ~Source_GUI_Base();
52
53 static wxNotebook* Create(wxWindow* parent,
54 wxChoice*& SourceChoice,
55 SourceDetails_Display_GUI*& m_SourceSourceDetails_Display_GUI
56 );
57
58 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
59 bool IsShown() { return m_GUI->IsShown(); };
60 wxNotebook* get() { return m_GUI; };
61
62 void Update( Source* element, const ::boost::shared_ptr<MatML_Doc> doc);
63
64 static ::std::string Label(::std::string name, ::std::string id);
65 static ::std::string LabelToId(::std::string label);
66
67 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
68 const wxTreeItemId& ParentId,
70 const wxTreeItemId& PreviousId
71 );
72
73 void SetConnect();
74 virtual void OnSourceChoice(wxCommandEvent& event) { event.Skip(); }
75
76 private:
77 };
78
80 {
81 public:
82
83 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
84
85 Source_GUI();
86 Source_GUI(wxWindow* parent);
87
88 virtual ~Source_GUI();
89
90 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
91 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
92
93 //Overwrites the base class functions
94 void OnSourceChoice(wxCommandEvent& event);
95
96
97 private:
98 };
99
100}; //namespace bellshire end
101
Definition: matml31.hxx:1705
Definition: matml31.hxx:3505
Definition: BT_MatML_Base_GUI.h:163
Definition: BT_MatML_Source_GUI.h:42
static wxNotebook * Create(wxWindow *parent, wxChoice *&SourceChoice, SourceDetails_Display_GUI *&m_SourceSourceDetails_Display_GUI)
Create the GUI for the Source MatML Data and Info
Definition: BT_MatML_Source_GUI.cpp:38
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, Source &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_Source_GUI.cpp:158
Definition: BT_MatML_Source_GUI.h:80
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_Source_GUI.cpp:220
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_Source_GUI.cpp:231
virtual ~Source_GUI()
Destructor for the derived class
Definition: BT_MatML_Source_GUI.cpp:211
Source_GUI()
Constructor for the derived class
Definition: BT_MatML_Source_GUI.cpp:192
Definition: BT_MatML_SourceDetails_Display_GUI.h:44
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