xoreos  0.0.5
protoitem.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_AURORA_KOTORJADEGUI_PROTOITEM_H
26 #define ENGINES_AURORA_KOTORJADEGUI_PROTOITEM_H
27 
30 
31 namespace Engines {
32 
34 public:
35  WidgetProtoItem(GUI &gui, const Common::UString &tag, WidgetListBox *parentList = 0);
37 
41  virtual void setContents(const Common::UString &contents);
42 
43  bool isHovered() const;
44 
45  virtual void load(const Aurora::GFF3Struct &gff);
46 
47  void enter();
48  void leave();
49 
50  void mouseUp(uint8 state, float x, float y);
51 
52  virtual void mouseWheel(uint8 state, int x, int y);
53 
54  void setDisableHighlight(bool disableHighlight);
55 
56  void setSoundHover(const Common::UString &resRef);
57  void setSoundClick(const Common::UString &resRef);
58 
59 private:
61  bool _hovered;
62 
64 
67 
69 };
70 
71 } // End of namespace Engines
72 
73 #endif // ENGINES_AURORA_KOTORJADEGUI_PROTOITEM_H
void setSoundHover(const Common::UString &resRef)
Definition: protoitem.cpp:93
A class holding an UTF-8 string.
Definition: ustring.h:48
WidgetListBox * _parentList
Definition: protoitem.h:63
uint8_t uint8
Definition: types.h:200
void setDisableHighlight(bool disableHighlight)
Definition: protoitem.cpp:89
void setDefaultHighlighting(Graphics::Aurora::Highlightable *highlightable)
Definition: protoitem.cpp:101
A GUI.
Definition: gui.h:43
void mouseUp(uint8 state, float x, float y)
A mouse button was released on the widget.
Definition: protoitem.cpp:82
A list box widget for Star Wars: Knights of the Old Republic and Jade Empire.
void setSoundClick(const Common::UString &resRef)
Definition: protoitem.cpp:97
virtual void load(const Aurora::GFF3Struct &gff)
Definition: protoitem.cpp:53
Common base for Star Wars: Knights of the Old Republic and Jade Empire widgets.
virtual void setContents(const Common::UString &contents)
Set item contents.
Definition: protoitem.cpp:44
bool isHovered() const
Definition: protoitem.cpp:49
A struct within a GFF3.
Definition: gff3file.h:164
Common::UString _soundClick
Definition: protoitem.h:66
WidgetProtoItem(GUI &gui, const Common::UString &tag, WidgetListBox *parentList=0)
Definition: protoitem.cpp:34
void leave()
The mouse left the widget.
Definition: protoitem.cpp:75
void enter()
The mouse entered the widget.
Definition: protoitem.cpp:65
virtual void mouseWheel(uint8 state, int x, int y)
A mouse wheel was used on the widget.
Definition: protoitem.cpp:108
Common::UString _soundHover
Definition: protoitem.h:65