Orxonox  0.0.5 Codename: Arcturus
NotificationQueueCEGUI.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Damian 'Mozork' Frick
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _NotificationOueueCEGUI_H__
36 #define _NotificationOueueCEGUI_H__
37 
39 
40 #include <string>
41 #include "util/Math.h"
42 
43 #include "NotificationManager.h"
44 
45 #include "NotificationQueue.h"
46 
47 namespace orxonox // tolua_export
48 { // tolua_export
49 
68  : public NotificationQueue
69  { // tolua_export
70 
71  public:
73  virtual ~NotificationQueueCEGUI();
74 
75  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
76 
77  virtual void changedName(void) override;
78 
79  void destroy(bool noGraphics = false); // Destroys the NotificationQueue.
80 
81  void setDisplaySize(const Vector4& size); // Set the size of the window that displays the NotificationQueue.
82 
87  inline const Vector4& getDisplaySize(void) const
88  { return this->displaySize_; }
89  void displaySizeChanged(void); // Is called when the display size has changed.
90 
91  void setPosition(const Vector4& position); // Set the position of the window that displays the NotificationQueue.
96  inline const Vector4& getPosition(void) const
97  { return this->position_; }
98  void positionChanged(void); // Is called when the NotificationQueue's position has changed.
99 
100  void setAlignment(const std::string& alignment); // Set the horizontal alignment of the Notifications text.
105  inline const std::string& getAlignment(void)
106  { return this->alignment_; }
107  void alignmentChanged(void); // Is called when the horizontal alignment of the Notifications text has changed.
108 
109  void setFontSize(unsigned int size); // Set the font size of the text displayed by this NotificationQueue.
114  inline unsigned int getFontSize(void)
115  { return this->fontSize_; }
116  void fontSizeChanged(void); // Is called when the font size of the text displayed by this NotificationQueue has changed.
117 
118  void setFontColor(const Vector4& color); // Set the font color if the text displayed by this NotificationQueue.
123  inline const Vector4& getFontColor(void) const
124  { return this->fontColor_; }
129  inline const std::string& getFontColorStr(void) const
130  { return this->fontColorStr_; }
131  void fontColorChanged(void); // Is called when the font color if the text displayed by this NotificationQueue has changed.
132 
133  static NotificationQueueCEGUI* getQueue(const std::string& name); // tolua_export // Get the NotificationQueueCEGUI with the input name.
134 
135  protected:
136  void registerVariables();
137 
138  virtual void create(void) override; // Creates the NotificationQueue in lua.
139 
140  virtual void notificationPushed(Notification* notification) override; // Is called by the NotificationQueue when a Notification was pushed
141  virtual void notificationPopped(void) override; // Is called by the NotificationQueue when a Notification was popped.
142  virtual void notificationRemoved(unsigned int index) override; // Is called when a Notification was removed.
143 
144  virtual void clear(bool noGraphics = false) override; // Clears the NotificationQueue by removing all NotificationContainers.
145 
146  protected:
148 
149  private:
150  Vector4 displaySize_;
151  Vector4 position_;
153  unsigned int fontSize_;
154  Vector4 fontColor_;
156 
157  void initialize(void); // Initializes The NotificationQueueCEGUI.
158 
159  }; // tolua_export
160 
161 } // tolua_export
162 
163 #endif /* _NotificationQueueCEGUI_H__ */
Vector4 position_
The position of the window that displays the NotificationQueue.
Definition: NotificationQueueCEGUI.h:151
const Vector4 & getPosition(void) const
Get the position of the window that displays the NotificationQueue.
Definition: NotificationQueueCEGUI.h:96
::std::string string
Definition: gtest-port.h:756
#define _NotificationsExport
Definition: NotificationsPrereqs.h:60
The MetaPickup destroys all the PickupCarriers&#39; Pickupables.
Displays Notifications from specific senders.
Definition: NotificationQueue.h:92
unsigned int getFontSize(void)
Get the font size of the text displayed by this NotificationQueue.
Definition: NotificationQueueCEGUI.h:114
static const std::string NOTIFICATION_LAYER
The name of the NotificationLayer menu sheet.
Definition: NotificationQueueCEGUI.h:147
Definition of the NotificationManager class.
xmlelement
Definition: Super.h:519
Declaration and implementation of several math-functions, typedefs of some Ogre::Math classes to the ...
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the questsystem module ...
const std::string & getAlignment(void)
Get the horizontal alignment of the Notifications text.
Definition: NotificationQueueCEGUI.h:105
Mode
Definition: CorePrereqs.h:102
const Vector4 & getFontColor(void) const
Get the font color of the text displayed by this NotificationQueue.
Definition: NotificationQueueCEGUI.h:123
Definition: Context.h:45
Vector4 displaySize_
The size of the window that displays the NotificationQueue.
Definition: NotificationQueueCEGUI.h:150
std::string fontColorStr_
The font color of the Notifications text as a string with the ARGB hexadecimal values.
Definition: NotificationQueueCEGUI.h:155
unsigned int fontSize_
The font size of the Notifications text.
Definition: NotificationQueueCEGUI.h:153
const std::string & getFontColorStr(void) const
Get the font color of the text displayed by this NotificationQueue.
Definition: NotificationQueueCEGUI.h:129
A Notification represents a short message used to inform the player about something that just happene...
Definition: NotificationManager.h:61
Displays Notifications using CEGUI.
Definition: NotificationQueueCEGUI.h:67
Definition of the NotificationQueue class.
Vector4 fontColor_
The font color of the Notifications text as a vector, in RGBA form, with values from 0 to 1...
Definition: NotificationQueueCEGUI.h:154
std::string alignment_
The horizontal alignment of the Notifications text.
Definition: NotificationQueueCEGUI.h:152
const Vector4 & getDisplaySize(void) const
Get the size of the window that displays the NotificationQueue.
Definition: NotificationQueueCEGUI.h:87