2 * $Logfile: /Freespace2/code/MissionUI/Chatbox.h $
7 * Header file for chat box code
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 3 5/22/99 5:35p Dave
15 * Debrief and chatbox screens. Fixed small hi-res HUD bug.
17 * 2 10/07/98 10:53a Dave
20 * 1 10/07/98 10:49a Dave
22 * 14 9/11/98 5:08p Dave
23 * More tweaks to kick notification system.
25 * 13 9/11/98 4:14p Dave
26 * Fixed file checksumming of < file_size. Put in more verbose kicking and
27 * PXO stats store reporting.
29 * 12 5/15/98 5:15p Dave
30 * Fix a standalone resetting bug.Tweaked PXO interface. Display captaincy
31 * status for team vs. team. Put in asserts to check for invalid team vs.
34 * 11 4/14/98 5:06p Dave
35 * Don't load or send invalid pilot pics. Fixed chatbox graphic errors.
36 * Made chatbox display team icons in a team vs. team game. Fixed up pause
37 * and endgame sequencing issues.
39 * 10 4/12/98 2:09p Dave
40 * Make main hall door text less stupid. Make sure inputbox focus in the
41 * multi host options screen is managed more intelligently.
43 * 9 4/01/98 11:19p Dave
44 * Put in auto-loading of xferred pilot pic files. Grey out background
45 * behind pinfo popup. Put a chatbox message in when players are kicked.
46 * Moved mission title down in briefing. Other ui fixes.
48 * 8 3/29/98 1:24p Dave
49 * Make chatbox not clear between multiplayer screens. Select player ship
50 * as default in mp team select and weapons select screens. Made create
51 * game mission list use 2 fixed size columns.
53 * 7 2/13/98 3:46p Dave
54 * Put in dynamic chatbox sizing. Made multiplayer file lookups use cfile
57 * 6 1/16/98 2:34p Dave
58 * Made pause screen work properly (multiplayer). Changed how chat packets
61 * 5 1/07/98 5:20p Dave
62 * Put in support for multiplayer campaigns with the new interface
65 * 4 12/18/97 8:59p Dave
66 * Finished putting in basic support for weapon select and ship select in
69 * 3 10/01/97 4:47p Lawrance
70 * move some #defines out of header file into .cpp file
72 * 2 10/01/97 4:39p Lawrance
73 * move chat code into Chatbox.cpp, simplify interface
75 * 1 10/01/97 10:54a Lawrance
80 #ifndef __FREESPACE_CHATBOX_H__
81 #define __FREESPACE_CHATBOX_H__
86 #define CHATBOX_MAX_LEN 125 // max length of the actual text string
88 // chatbox flags for creation/switching between modes
89 #define CHATBOX_FLAG_SMALL (1<<0) // small chatbox
90 #define CHATBOX_FLAG_BIG (1<<1) // big chatbox
91 #define CHATBOX_FLAG_MULTI_PAUSED (1<<2) // chatbox in the multiplayer paused screen
92 #define CHATBOX_FLAG_DRAW_BOX (1<<3) // should be drawn by the chatbox code
93 #define CHATBOX_FLAG_BUTTONS (1<<4) // the chatbox should be drawing/checking its own buttons
94 // NOTE : CHATBOX_FLAG_BUTTONS requires that CHATBOX_FLAG_DRAW_BOX is also set!
96 // initialize all chatbox details with the given mode flags
97 int chatbox_create(int mode_flags = (CHATBOX_FLAG_SMALL | CHATBOX_FLAG_DRAW_BOX | CHATBOX_FLAG_BUTTONS));
99 // process this frame for the chatbox
100 int chatbox_process(int key_in=-1);
102 // shutdown all chatbox functionality
103 void chatbox_close();
105 // render the chatbox for this frame
106 void chatbox_render();
108 // try and scroll the chatbox up. return 0 or 1 on fail or success
109 int chatbox_scroll_up();
111 // try and scroll the chatbox down, return 0 or 1 on fail or success
112 int chatbox_scroll_down();
114 // clear the contents of the chatbox
115 void chatbox_clear();
117 // add a line of text (from the player identified by pid) to the chatbox
118 void chatbox_add_line(char *msg,int pid,int add_id = 1);
120 // force the chatbox to go into small mode (if its in large mode) - will not wotk if in multi paused chatbox mode
121 void chatbox_force_small();
123 // force the chatbox to go into big mode (if its in small mode) - will not work if in multi paused chatbox mode
124 void chatbox_force_big();
126 // "lose" the focus on the chatbox inputbox
127 void chatbox_lose_focus();
129 // return if the inputbox for the chatbox currently has focus
130 int chatbox_has_focus();
132 // grab the focus for the chatbox inputbox
133 void chatbox_set_focus();
135 // return if the inputbox was pressed - "clicked on"
136 int chatbox_pressed();
138 // reset all timestamps associated with the chatbox
139 void chatbox_reset_timestamps();