Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/chat/src/orxonox/ChatInputHandler.h @ 6776

Last change on this file since 6776 was 6776, checked in by smerkli, 14 years ago

Added ChatInputHandler facilities and started implementing them.

File size: 1.8 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 *      Sandro 'smerkli' Merkli
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _ChatInputHandler_H__
30#define _ChatInputHandler_H__
31
32/* std includes */
33#include <deque>
34#include <string>
35#include <fstream>
36#include <iostream>
37#include <cassert>
38
39/* project includes */
40#include <OrxonoxPrereqs.h>
41#include <InputBuffer.h>
42
43
44namespace orxonox
45{
46  /* class to handle chat using an InputBuffer */
47  class _OrxonoxExport ChatInputHandler
48  {
49    private:
50      /** Input buffer, to be used to catch input from the
51       * keyboard
52       */
53      InputBuffer *inpbuf;
54
55      /* setup input buffer, the constructor calls this */
56      void configureInputBuffer();
57
58    public:
59      /** constructor */
60      ChatInputHandler();
61
62      void inputChanged();
63      void addline();
64      void backspace();
65      void deleteChar();
66      void cursorRight();
67      void cursorLeft();
68      void cursorEnd();
69      void cursorHome();
70      void exit();
71  };
72
73
74}
75
76
77#endif /*_ChatInputHandler_H__*/
Note: See TracBrowser for help on using the repository browser.