1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003-2005 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * @file DisplayMessage.h
23 * Declaration of the DisplayMessage class used for displaying messages in
27 #ifndef DISPLAYMESSAGE_H
28 #define DISPLAYMESSAGE_H
34 class GEM_EXPORT DisplayMessage
42 /** returns a string reference from a string reference index constant */
43 ieStrRef
GetStringReference(int stridx
) const;
44 /** returns true if a string reference for a string reference index constant exists */
45 bool HasStringReference(int stridx
) const;
46 /** returns the speaker's color and name */
47 unsigned int GetSpeakerColor(const char *&name
, const Scriptable
*&speaker
) const;
48 /** displays any string in the textarea */
49 void DisplayString(const char *txt
, Scriptable
*speaker
=NULL
) const;
50 /** displays a string constant in the textarea */
51 void DisplayConstantString(int stridx
, unsigned int color
, Scriptable
*speaker
=NULL
) const;
52 /** displays actor name - action : parameter */
53 void DisplayConstantStringNameString(int stridx
, unsigned int color
, int stridx2
, const Scriptable
*actor
) const;
54 /** displays a string constant followed by a number in the textarea */
55 void DisplayConstantStringValue(int stridx
, unsigned int color
, ieDword value
) const;
56 /** displays a string constant in the textarea, starting with speaker's name */
57 void DisplayConstantStringName(int stridx
, unsigned int color
, const Scriptable
*speaker
) const;
58 /** displays a string constant in the textarea, starting with actor, and ending with target */
59 void DisplayConstantStringAction(int stridx
, unsigned int color
, const Scriptable
*actor
, const Scriptable
*target
) const;
60 /** displays a string in the textarea */
61 void DisplayString(int stridx
, unsigned int color
, ieDword flags
) const;
62 void DisplayString(const char *text
, unsigned int color
, Scriptable
*target
) const;
63 /** displays a string in the textarea, starting with speaker's name */
64 void DisplayStringName(int stridx
, unsigned int color
, const Scriptable
*speaker
, ieDword flags
) const;
65 void DisplayStringName(const char *text
, unsigned int color
, const Scriptable
*speaker
) const;
68 extern GEM_EXPORT DisplayMessage
* displaymsg
;