xoreos  0.0.5
charportrait.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_NWN_GUI_CHARGEN_CHARPORTRAIT_H
26 #define ENGINES_NWN_GUI_CHARGEN_CHARPORTRAIT_H
27 
28 #include <vector>
29 
32 
33 namespace Engines {
34 
35 namespace NWN {
36 
37 class PortraitWidget;
38 
40 public:
41  WidgetGridItemPortrait(GUI &gui, const Common::UString &portrait);
43 
44  float getHeight() const;
45  float getWidth() const;
46 
47  void mouseDown(uint8 state, float x, float y);
48 
49  bool activate();
50  bool deactivate();
51 
52 private:
55 };
56 
57 class CharPortrait : public CharGenBase {
58 public:
59  CharPortrait(CharGenChoices &choices, ::Engines::Console *console = 0);
60  ~CharPortrait();
61 
62  void reset();
63  void show();
64 
65  void setMainTexture(const Common::UString &texture);
66 
67 private:
68  void callbackActive(Widget &widget);
69  const std::vector<Common::UString> initPortraitList();
70  void buildPortraitBox();
71 
74 };
75 
76 } // End of namespace NWN
77 
78 } // End of namespace Engines
79 
80 #endif // ENGINES_NWN_GUI_CHARGEN_CHARPORTRAIT_H
A class holding an UTF-8 string.
Definition: ustring.h:48
Common::UString _selectedPortrait
Definition: charportrait.h:73
void mouseDown(uint8 state, float x, float y)
A mouse button was pressed on the widget.
uint8_t uint8
Definition: types.h:200
WidgetGridBox * _portraitsBox
Definition: charportrait.h:72
An item widget within a NWN listbox widget.
Definition: listbox.h:51
const std::vector< Common::UString > initPortraitList()
void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
float getHeight() const
Get the widget&#39;s height.
A NWN GUI.
Definition: gui.h:54
void show()
Show the GUI.
The character generator base class.
WidgetGridItemPortrait(GUI &gui, const Common::UString &portrait)
A widget in a GUI.
Definition: widget.h:40
float getWidth() const
Get the widget&#39;s width.
void setMainTexture(const Common::UString &texture)
A NWN portrait widget.
Definition: portrait.h:121
CharPortrait(CharGenChoices &choices, ::Engines::Console *console=0)
A NWN gridbox widget.