#include <tString.h>
Public Types | |
typedef tColoredString | THISCLASS |
typedef for this class | |
typedef tString | BASE |
typedef for base clase | |
Public Member Functions | |
~tColoredString () | |
Destructor. | |
tColoredString () | |
Default constructor. | |
tColoredString (const tColoredString &other) | |
Copy constructor. | |
tColoredString (const tString &other) | |
Base copy constructor. | |
tColoredString (const CHAR *other) | |
Constructor from raw C string. | |
tColoredString (const tOutput &other) | |
Constructor from output gatherer. | |
WRAP_MUTATING_OPERATOR (=, CHAR const *) WRAP_MUTATING_OPERATOR( | |
Assignment operators. | |
BASE const & | WRAP_MUTATING_OPERATOR (=, tOutput const &) static tString RemoveColors(const CHAR *c) |
Removes the color codes from a string. | |
void | SetPos (int len, bool cut=false) |
Makes sure string has length len when color codes are removed. | |
void | RemoveTrailingColor () |
Removes trailing, unfinished color code. | |
int | LongestLine () const |
| |
Static Public Member Functions | |
static tColoredStringProxy | ColorString (REAL r, REAL g, REAL b) |
Creates a color string inserter. |
Definition at line 191 of file tString.h.
typedef tString tColoredString::BASE |
tColoredString::~tColoredString | ( | void | ) |
tColoredString::tColoredString | ( | void | ) |
tColoredString::tColoredString | ( | const tColoredString & | other | ) |
Copy constructor.
other | string to copy from |
Definition at line 1464 of file tString.cpp.
01465 :tString( other ) 01466 { 01467 }
tColoredString::tColoredString | ( | const tString & | other | ) | [explicit] |
Base copy constructor.
other | string to copy from |
Definition at line 1479 of file tString.cpp.
01480 :tString( other ) 01481 { 01482 }
tColoredString::tColoredString | ( | const tOutput & | other | ) | [explicit] |
Constructor from output gatherer.
other | output to copy from |
Definition at line 1509 of file tString.cpp.
01510 :tString( other ) 01511 { 01512 }
tColoredString::WRAP_MUTATING_OPERATOR | ( | CHAR const * | ) |
Assignment operators.
Removes the color codes from a string.
void tColoredString::SetPos | ( | int | len, | |
bool | cut = false | |||
) |
Makes sure string has length len when color codes are removed.
len | the desired length | |
cut | only if set, the length of the string may be reduced |
Reimplemented from tString.
Definition at line 1613 of file tString.cpp.
References RemoveTrailingColor(), and tString::SetPos().
Referenced by eTeam::Ranking(), and ePlayerNetID::Ranking().
01614 { 01615 // determine desired raw length taking color codes into account and possibly cutting 01616 int wishLen = len + ::RemoveTrailingColor( *this, cut ? len : -1 ); 01617 01618 // delegate 01619 tString::SetPos( wishLen, cut ); 01620 }
void tColoredString::RemoveTrailingColor | ( | void | ) |
Removes trailing, unfinished color code.
Definition at line 1631 of file tString.cpp.
Referenced by operator<<(), and SetPos().
01632 { 01633 // delegage 01634 ::RemoveTrailingColor( *this ); 01635 }
int tColoredString::LongestLine | ( | void | ) | const |
Reimplemented from tString.
Definition at line 1374 of file tString.cpp.
Referenced by rConsole::Render().
static tColoredStringProxy tColoredString::ColorString | ( | REAL | r, | |
REAL | g, | |||
REAL | b | |||
) | [inline, static] |
Creates a color string inserter.
Definition at line 219 of file tString.h.
Referenced by eTeam::AddPlayer(), ePlayerNetID::AddScore(), gGame::Analysis(), rConsole::ColorString(), eNameMessenger::eNameMessenger(), gMemuItemConsole::Event(), gCycle::KillAt(), operator<<(), eTeam::RankingGraph(), tConfItemLine::ReadVal(), ePlayerNetID::RemoveChatbots(), eTeam::RemovePlayer(), gServerMenu::Render(), rConsole::Render(), gServerMenuItem::RenderBackground(), se_BuildChatString(), se_ChatMe(), se_DisplayChatLocally(), se_rubyEval(), se_SendPrivateMessage(), se_SendTeamMessage(), sg_Deprecated(), eTeam::UpdateAppearance(), and ePlayerNetID::UpdateName().
00220 { 00221 return tColoredStringProxy( r, g, b ); 00222 }