1 #ifndef PAGECLASSES_H
2 #define PAGECLASSES_H
3 
4 #include "page.h"
5 #include <map>
6 
7 /** Forward Declarations **/
8 class DFClasses;
9 class Skill;
10 class wxWindow;
11 class wxTextCtrl;
12 class wxListBox;
13 class wxArrayString;
14 
15 struct SkillEdit
16 {
17 	wxListBox *list;
18 		wxArrayString *strArray;
19 	wxTextCtrl *minEdit;
20 	wxTextCtrl *maxEdit;
21 };
22 
23 class PageClasses : public Page
24 {
25 protected:
26 
27 public:
28 	DFClasses *dfClasses;
29 
30 public:
31 	PageClasses();
32 	virtual ~PageClasses();
33 
34 	void Init(wxNotebook*, DF*);
35 
36 	void UpdatePage();
37 
38 /*	void LoadAll();*/
39 /*	void SaveAll();*/
40 	void GetCurrent();
41 	void SetCurrent();
42 	void ClearCurrent();
43 
44 	void GetSkills();
45 	void SetSkills();
46 	void GetSkill(std::string&);
47 	void SetSkill(std::string&);
48 
49 	Skill* GetSelectedSkill(std::string&);
50 
51 	void OnSkillChange();
52 
53 protected:
54 	Skill *currentAttribute;
55 
56 	// List of editable controls
57 	wxTextCtrl *nameEdit;
58 	wxTextCtrl *shortNameEdit;
59 	wxTextCtrl *descEdit;
60 
61 	wxTextCtrl *hpBonusEdit;
62 	wxTextCtrl *mpBonusEdit;
63 	wxTextCtrl *skillBonusEdit;
64 	wxTextCtrl *attackBonusEdit;
65 	wxTextCtrl *levelProgressionEdit;
66 	wxTextCtrl *additionalAttackLevelEdit;
67 
68 	wxListBox *attributeList;
69 		wxArrayString *attributeStrArray;
70 	wxTextCtrl *attributeMinEdit;
71 	wxTextCtrl *attributeMaxEdit;
72 
73 	std::map<std::string,SkillEdit*> skillEdits;
74 	std::map<std::string,Skill*> currentSkills;
75 };
76 
77 #endif // PAGECLASSES_H
78