Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
optiondescription.hpp
1 //////////////////////////////
2 //
3 // File: swce/optiondescription.hpp
4 // Author: Maciej Kaminski
5 // E-mail: maciej.a.kaminski@gmail.com
6 // Website: maciejkaminski.pl
7 //
8 // File creation date: Feb 24 2013
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 __FEATURE_DESCRIPTION_H__
15 #define __FEATURE_DESCRIPTION_H__
16 #include "swrs/feature.hpp"
17 #include "swrs/power.hpp"
18 #include "lxs/windowing/button.hpp"
19 #include "lxs/windowing/textbox.hpp"
20 namespace SWCE
21 {
22  //! frame (not form, but one of frames within a form) describing particular option
24  {
25  LxS::Windowing::Rectangle2D * background;
26  LxS::Windowing::Label * name;
27  std::string name_raw;
28  LxS::Windowing::TextBox * flavor_text;
29  LxS::Windowing::Button * button;
30  const SWRS::IOption * p_RelevantOption;
31  bool show_fluff;
32  void ConstructorCommon();
33  public:
34  //! initial setup
35  void Configure();
36  //! get name of option associated
37  const std::string& GetName()
38  {return name_raw;}
39  void Refresh();
40  //! flavor text - hidden or shown
41  void SetShowFluff(bool f);
42  //! is fluff shown (fluff=flavor text on options)
43  bool GetShowFluff() {return show_fluff;}
44  //! a constructor
45  OptionDescriptionWindow(const SWRS::IOption * p_RelevantOption_);
46 
47  //! \brief add a button to a window.
48  //! i.e. a button used to add particular option to a character sheet
49  void AddButton();
50 
51  void Initialize();
52  //! used in conjunction with AddButton
53  void SetButtonText(const std::string & _text);
54  //! used in conjunction with AddButton
56  void Render(Renderable::Rendermode mode);
58  };
59  // end of class OptionDescriptionWindow
60 
61  //! no need for separate class, buf for future compatibility - typedef
63  //! no need for separate class, buf for future compatibility - typedef
65 }
66 
67 #endif