forked from mhernando/Apolo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
panelXML.h
90 lines (79 loc) · 2.21 KB
/
panelXML.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef __APOLO__PANEL_XML__H
#define __APOLO__PANEL_XML__H
#include "mrcore.h"
#include "tree.h"
#include <wx/frame.h>
#include <wx/panel.h>
#include <wx/textctrl.h>
#include <wx/combobox.h>
#include <wx/listbox.h>
#include <wx/wx.h>
#include <wx/listctrl.h>
#include "bitmaps/iconsearch.xpm"
#include "bitmaps/update.xpm"
#include "bitmaps/selworldxml.xpm"
#include "bitmaps/createworld.xpm"
#include "bitmaps/Objects.xpm"
#include "bitmaps/checkIcon.xpm"
#include "bitmaps/itemSelected.xpm"
#include "bitmaps/AddXMLEntity.xpm"
#include "bitmaps/xmlwindow.xpm"
#include "bitmaps/SaveXMLEdit.xpm"
#include <wx/laywin.h>
using namespace std;
class PanelXML : public wxFrame
{
public:
PanelXML(wxWindow *parent,wxWindowID id,const wxString& title,Tree* tree);
void CreatePanel();
void InitToolbars();
void Initialize();
void ParseXML(wxCommandEvent& event);
void SaveXML(wxCommandEvent& WXUNUSED(event));
void UpdateXML(wxCommandEvent& event);
void getItemXML();
void UpdateSelectedWorld(wxCommandEvent& event);
void UpdateList();
void UpdateWorldsList();
void ShowPanel();
void ManageState();
void updateEntity(wxString name);
void CreateWorld(wxCommandEvent& event);
wxArrayString getChoices(){return Choices;}
void SelectItem(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void CreateNewEntity(wxCommandEvent& event);
void SelectItemInList(wxListEvent& event);
bool CheckDeclaredElement(string ele);
bool CheckDeclaredAttribute(string attr);
void CreateTree();
void TreatXMLText(char * XMLText);
void UpdateTreeView();
void SetInformationFromTree(NodeTree* nod,TypeNode type);
void GetElementVariables();
void UpdateText(wxCommandEvent& event);
Object* CreateEntity(XMLElement * elem);
private:
wxPanel *panel;
wxTextCtrl* textCtrl;
wxTextCtrl* EntityName;
wxListCtrl* ItemsList;
wxArrayString worldNames;
wxArrayString Choices;
wxComboBox* selectW;
wxToolBar* Toolbar;
wxBitmapButton* staticonworld;
wxArrayString Items;
wxBoxSizer *edit;
int state; //Create or modify
int selectedItem;
int selectedWorld;
wxTreeItemId m_root;
Tree* tree;
Tree* treevisible;
NodeTree* item;
vector<char *> variables;
vector<char *> values;
DECLARE_EVENT_TABLE();
};
#endif // __APOLO__PANEL_XML__H