Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation/src/orxonox/overlays/notifications/Notification.h @ 2736

Last change on this file since 2736 was 2436, checked in by rgrieder, 16 years ago

Added svn:eol-style "native" to all files.

  • Property svn:eol-style set to native
File size: 2.6 KB
RevLine 
[2280]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
29#ifndef _Notification_H__
30#define _Notification_H__
31
32#include "OrxonoxPrereqs.h"
33
34#include <string>
35
36#include "core/BaseObject.h"
37
[2435]38namespace orxonox
39{
40    static const float NOTIFICATION_DISPLAY_TIME = 4.0;
[2280]41
42    /**
43    @brief
[2435]44        This is rather temporary, so don't start relying on it, some better version will come soon but the Interface will not likely be the same.
[2280]45    @author
46        Damian 'Mozork' Frick
47    */
48    class _OrxonoxExport Notification : public BaseObject
49    {
[2435]50    public:
51        Notification(BaseObject* creator);
52        Notification(BaseObject* creator, const std::string & message, const std::string & title = "", float time = NOTIFICATION_DISPLAY_TIME);
53        virtual ~Notification();
54       
55        bool send(void);
56       
57        inline bool isSent(void) const
58            { return this->sent_; }
59        inline const std::string & getTitle(void) const
60            { return this->title_; }
61        inline const std::string & getMessage(void) const
62            { return this->message_; }
63        inline const float getDisplayTime(void) const
64            { return displayTime_; }
65       
66        bool setTitle(const std::string & title);
67        bool setMessage(const std::string & message);
68        bool setDisplayTime(float time);
69       
70    private:
71        std::string title_; //!< The title of the Notification.
72        std::string message_; //!< The Notification message.
73        float displayTime_; //!< The time duration the Notification is displayed in seconds.
74        bool sent_; //!< Whether Notification has been sent, if so it cannot be changed.
75       
76        void initialize(void);
[2280]77    };
78}
79
80#endif /* _Notification_H__ */
Note: See TracBrowser for help on using the repository browser.