BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
BT_MatML_ChemicalElementSymbol_GUI.h
1
2// Name: BT_MatML_ChemicalElementSymbol_GUI.h
3// Purpose: Classes of ChemicalElementSymbol_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
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
37 //Utility for std:string and wxString
38 #define _std2wx(var) wxString (var.c_str(),wxConvUTF8)
39 #define _wx2std(var) std::string(var.mb_str())
40
42 {
43 public:
44 wxChoice* m_ChemicalElementSymbolChoice;
45 wxNotebook* m_GUI;
46
48 ChemicalElementSymbol_GUI_Base(wxWindow* parent);
49 static wxNotebook* Create(wxWindow* parent, wxChoice*& ChemicalElementSymbolChoice);
51
52 void Show(bool show = true) { if (m_GUI != nullptr) m_GUI->Show(show); };
53 wxNotebook* get() { return m_GUI; };
54
55 static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl,
56 const wxTreeItemId& ParentId,
58 const wxTreeItemId& PreviousId
59 );
60 void Update( ChemicalElementSymbol* element);
61
62 void SetConnect();
63 virtual void OnChemicalElementSymbol(wxCommandEvent& event) { event.Skip(); }
64
65 private:
66 };
67
69 {
70 public:
71
72 TreeCtrlSorted* m_MatMLTreeCtrl;//Required before Event Handling.
73
75 ChemicalElementSymbol_GUI(wxWindow* parent);
76
78
79 void SetEvtHandlerVar(TreeCtrlSorted*& MatMLTreeCtrl);//Required before Event Handling.
80 void SetMatMLTreeCtrl(TreeCtrlSorted*& MatMLTreeCtrl);
81
82 //Overwrites the base class functions
83 void OnChemicalElementSymbol(wxCommandEvent& event);
84
85 private:
86 };
87
88}; //namespace bellshire end
Definition: matml31.hxx:5172
Definition: matml31.hxx:1705
Definition: BT_MatML_ChemicalElementSymbol_GUI.h:42
static wxNotebook * Create(wxWindow *parent, wxChoice *&ChemicalElementSymbolChoice)
Create the GUI for the ChemicalElementSymbol MatML Data and Info
Definition: BT_MatML_ChemicalElementSymbol_GUI.cpp:34
static wxTreeItemId SetupMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl, const wxTreeItemId &ParentId, ChemicalElementSymbol &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_ChemicalElementSymbol_GUI.cpp:94
Definition: BT_MatML_ChemicalElementSymbol_GUI.h:69
void SetMatMLTreeCtrl(TreeCtrlSorted *&MatMLTreeCtrl)
Set the Event Handler associated with the MatML wxTreeCtrl Required before using the derived class's ...
Definition: BT_MatML_ChemicalElementSymbol_GUI.cpp:167
void SetEvtHandlerVar(TreeCtrlSorted *&MatMLTreeCtrl)
Function used to set up this objects member variables which is used in the EventHandler's functions....
Definition: BT_MatML_ChemicalElementSymbol_GUI.cpp:157
virtual ~ChemicalElementSymbol_GUI()
Destructor for the derived class
Definition: BT_MatML_ChemicalElementSymbol_GUI.cpp:148
ChemicalElementSymbol_GUI()
Constructor for the derived class
Definition: BT_MatML_ChemicalElementSymbol_GUI.cpp:128
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