Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
editor.hpp
1 //////////////////////////////
2 //
3 // File: swce/editor.hpp
4 // Author: Maciej Kaminski
5 // E-mail: maciej.a.kaminski@gmail.com
6 // Website: maciejkaminski.pl
7 //
8 // File creation date: Oct 29 2012
9 // This file is part of Project Labyrinth
10 // This file is going to be released under terms of GNU GPL in near future
11 //
12 //////////////////////////////
13 
14 #ifndef __LXS_SWCE_EDITOR__
15 #define __LXS_SWCE_EDITOR__
16 #include "helper/opengl.hpp"
17 #include "helper/tr1.hpp"
18 #include <string>
19 #include "lxs/windowing/form.hpp"
20 namespace SWRS
21 {
22  class Character;
23  class RulesSystem;
24 }
25 //!@brief Set of classes implementing character editor (including basis for character advancement system)
26 namespace SWCE
27 {
28  class EditorCommonStatus;
29  class AttributesForm;
30  class SkillsForm;
31  class DerivedStatsForm;
32  class HindrancesForm;
33  class EdgesForm;
34  class Summary;
35  class RaceSelectionForm;
36  class PowersForm;
37  //! default character editor form (has many subforms)
39  {
40  protected:
41  friend class Button;
42  friend class Exporter;
43  friend class Importer;
44  //! return common status object
45  EditorCommonStatus * GetCommonStatus()throw() {return cs;}
46  //! pointer shared by all forms of editor
48  //! if resetting an editor is in progress, it is unusable. don't do
49  //! anything stupid as you may cause memory error or worse!
51  //! show/hide flavor texts
52  bool show_fluff;
53  //! attributes form
55  //! skills form
57  //! derived stats form
59  //! hindrances form
61  //! edges form
63  //! race selection form
65  //! character summary
67  //! powers selection form
69  //! reinitialize editor (i.e. upon loading new character)
70  void ReinitEditor();
71  //! reset character
73 
74  public:
75  //! display expanded description in feature selection boxes
76  void SetShowFluff(bool f);
77  //! do I display those in feature selection boxes
78  bool GetShowFluff() {return show_fluff;}
79 
81  //! Attach savage worlds rules system
82  void AttachRulesSystem(const SWRS::RulesSystem * rs);
83  //! Attach character
85  Editor();
86  ~Editor();
87  void Refresh();
88  void Initialize();
89  void SaveFile();
90  };
91  // end of class Editor
92 }
93 #endif