Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tutoriallevel2/src/modules/notifications/NotificationQueueCEGUI.h @ 8446

Last change on this file since 8446 was 8446, checked in by dafrick, 13 years ago

Removing editMode stuff, since that doesn't work anymore and that won't change for quite some time.
Seperating CEGUI from NotificationQueue stuff by introducing a new NotificationQueue called the NotificationQueueCEGUI.

File size: 3.4 KB
Line 
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/**
30    @file NotificationQueueCEGUI.h
31    @brief Definition of the NotificationQueueCEGUI class.
32    @ingroup Notifications
33*/
34
35#ifndef _NotificationOueueCEGUI_H__
36#define _NotificationOueueCEGUI_H__
37
38#include "notifications/NotificationsPrereqs.h"
39
40#include <string>
41
42#include "NotificationManager.h"
43#include "NotificationQueue.h"
44
45namespace orxonox // tolua_export
46{ // tolua_export
47
48    //TODO: Update.
49    /**
50    @brief
51        Displays @ref orxonox::Notification "Notifications" from specific senders.
52
53        There are quite some parameters that influence the behavior of the NotificationQueue:
54        - @b name The name of the NotificationQueue. It needs to be unique.
55        - @b senders The senders that are targets of this NotificationQueue, i.e. the names of senders whose Notifications this NotificationQueue displays.
56        - @b size The size of the NotificationQueue, it specifies how many @ref orxonox::Notification "Notifications" are displayed at once at the most.
57        - @b displayTime The time a @ref orxonox::Notification "Notification" is displayed with this NotificationQueue.
58
59    @author
60        Damian 'Mozork' Frick
61
62    @ingroup Notifications
63    */
64    class _NotificationsExport NotificationQueueCEGUI // tolua_export
65        : public NotificationQueue
66    { // tolua_export
67
68        public:
69            NotificationQueueCEGUI(const std::string& name, const std::string& senders = NotificationListener::ALL, unsigned int size = NotificationQueue::DEFAULT_SIZE, unsigned int displayTime = NotificationQueue::DEFAULT_DISPLAY_TIME);
70            virtual ~NotificationQueueCEGUI();
71
72            //! Destroys the NotificationQueue.
73            void destroy(bool noGraphics = false); // tolua_export
74           
75        protected:
76            virtual void notificationPushed(Notification* notification); // Is called by the NotificationQueue when a notification was pushed
77            virtual void notificationPopped(void); // Is called by the NotificationQueue when a notification was popped.
78            virtual void notificationRemoved(unsigned int index); // Is called when a notification was removed.
79           
80            virtual void clear(bool noGraphics = false); // Clears the NotificationQueue by removing all NotificationContainers.
81           
82        private:
83            void create(void); // Creates the NotificationQueue in lua.           
84
85    }; // tolua_export
86
87} // tolua_export
88
89#endif /* _NotificationQueueCEGUI_H__ */
Note: See TracBrowser for help on using the repository browser.