Planeshift
pawsinteractwindow.h
Go to the documentation of this file.
1 /*
2  * pawsinteractwindow.h - Author: Andrew Craig
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program 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 (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef PAWS_INTERACT_WINDOW_HEADER
21 #define PAWS_INTERACT_WINDOW_HEADER
22 
23 #include "paws/pawswidget.h"
24 #include "gui/chatwindow.h"
25 
26 class pawsTextBox;
27 class pawsMessageTextBox;
28 
33 {
34 public:
36  virtual ~pawsInteractWindow();
37 
38  bool PostSetup();
39 
40  void HandleMessage( MsgEntry* message );
41  bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
42  bool OnMouseDown(int button, int modifiers,int x,int y);
43  void Hide();
44 
45  void Draw();
46 
47  void OnStringEntered(const char *name,int param,const char *value);
48 
49 private:
50  csArray<csString> names;
51  csArray<int> types;
52 
53  int openTick;
54 
55  csString genericCommand;
56 
57  pawsChatWindow* chatWindow;
58 };
59 
60 //--------------------------------------------------------------------------
62 
63 
64 #endif
65 
66 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
csString name
The name of this widget.
Definition: pawswidget.h:217
Main Chat window for PlaneShift.
Definition: chatwindow.h:133
void OnStringEntered(const char *name, int param, const char *value)
When the pawsStringPromptWindow is created, a ptr to a class which implements this function is provid...
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
void HandleMessage(MsgEntry *message)
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
virtual ~pawsInteractWindow()
CREATE_PAWS_FACTORY(pawsInteractWindow)
bool OnMouseDown(int button, int modifiers, int x, int y)
Manage mouse down event to test for and apply window changes.
This is a special type of text box that is used for messages.
Definition: pawstextbox.h:285
This interface defines the callback used by pawsStringPromptWindow to notify another window of a supp...
This is the window that allows you to interact with the world.
void Draw()
Draws the widget and all of it&#39;s children.
A basic text box widget.
Definition: pawstextbox.h:42
void Hide()
Makes widget invisible and removes focus if widget has current focus.