ManaPlus
Macros | Variables
chatwindow.cpp File Reference

(986a3bf)

#include "gui/windows/chatwindow.h"
#include "actormanager.h"
#include "game.h"
#include "guild.h"
#include "party.h"
#include "settings.h"
#include "spellmanager.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
#include "const/gui/chat.h"
#include "fs/virtfs/tools.h"
#include "input/inputmanager.h"
#include "gui/focushandler.h"
#include "gui/gui.h"
#include "gui/skin.h"
#include "gui/viewport.h"
#include "gui/models/colorlistmodel.h"
#include "gui/popups/popupmenu.h"
#include "gui/windows/setupwindow.h"
#include "gui/windows/whoisonline.h"
#include "gui/widgets/button.h"
#include "gui/widgets/chatinput.h"
#include "gui/widgets/createwidget.h"
#include "gui/widgets/dropdown.h"
#include "gui/widgets/itemlinkhandler.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/tabbedarea.h"
#include "gui/widgets/tabs/chat/battletab.h"
#include "gui/widgets/tabs/chat/channeltab.h"
#include "gui/widgets/tabs/chat/gmtab.h"
#include "gui/widgets/tabs/chat/langtab.h"
#include "gui/widgets/tabs/chat/tradetab.h"
#include "gui/widgets/tabs/chat/whispertab.h"
#include "render/opengl/opengldebug.h"
#include "resources/db/textdb.h"
#include "net/chathandler.h"
#include "net/net.h"
#include "utils/copynpaste.h"
#include "utils/delete2.h"
#include "utils/foreach.h"
#include "utils/translation/podict.h"
#include <sys/stat.h>
#include <fstream>
#include <sstream>
#include "debug.h"

Go to the source code of this file.

Macros

#define ifKey(key, str)
 
#define changeColor(fun)
 

Variables

ChatWindowchatWindow = 0
 
static const char *const ACTION_COLOR_PICKER = "color picker"
 

Macro Definition Documentation

◆ changeColor

#define changeColor (   fun)
Value:
{ \
msg = removeColors(msg); \
int skip = 0; \
const size_t sz = msg.length(); \
for (size_t f = 0; f < sz; f ++) \
{ \
if (skip > 0) \
{ \
newMsg += msg.at(f); \
skip --; \
continue; \
} \
const unsigned char ch = CAST_U8(msg.at(f)); \
if (f + 2 < sz && msg.substr(f, 2) == "%%") \
{ \
newMsg += msg.at(f); \
skip = 2; \
} \
else if (ch > 0xc0 || ch < 0x80) \
{ \
newMsg += "##" + toString(fun) + msg.at(f); \
if (mRainbowColor > 9U) \
mRainbowColor = 0U; \
} \
else \
{ \
newMsg += msg.at(f); \
} \
} \
}
#define CAST_U8
Definition: cast.h:27
bool msg(InputEvent &event)
Definition: chat.cpp:39
std::string toString(T const &value)
converts any type to a string
Definition: catch.hpp:1774
std::string removeColors(std::string msg)

Definition at line 1372 of file chatwindow.cpp.

◆ ifKey

#define ifKey (   key,
  str 
)
Value:
else if (actionId == (key)) \
{ \
temp = str; \
}

Definition at line 816 of file chatwindow.cpp.

Variable Documentation

◆ ACTION_COLOR_PICKER

const char* const ACTION_COLOR_PICKER = "color picker"
static

Definition at line 96 of file chatwindow.cpp.

Referenced by ChatWindow::action(), and ChatWindow::ChatWindow().

◆ chatWindow

ChatWindow* chatWindow = 0

Definition at line 94 of file chatwindow.cpp.

Referenced by StatDebugTab::action(), SetupWindow::action(), StatusWindow::action(), ChatWindow::addSpecialChannelTab(), Setup_Chat::apply(), GameModifiers::changeAwayMode(), ChatTab::chatLog(), ChatTab::ChatTab(), LocalPlayer::checkNewName(), createGuiWindows(), Ea::PartyRecv::createTab(), EAthena::ClanRecv::createTab(), GuildManager::createTab(), WindowManager::createWindows(), WindowManager::deleteWindows(), destroyGuiWindows(), IPC::flush(), ChatInput::focusLost(), Game::Game(), ChannelTab::handleCommand(), WhisperTab::handleCommand(), WhoIsOnline::handleLink(), Game::handleMove(), ActorManager::heal(), SpellManager::invokeCommand(), SpellManager::invokeSpell(), ActorManager::itenplz(), WhoIsOnline::loadList(), LocalPlayer::magicAttack(), AvatarListBox::mousePressed(), ItemContainer::mousePressed(), EAthena::ChatRecv::processBeingChat(), TmwAthena::ChatRecv::processBeingChat(), TmwAthena::ChatRecv::processChatContinue(), EAthena::ChatRecv::processChatContinue(), EAthena::ChatRecv::processChatRoomCreateAck(), EAthena::ChatRecv::processChatRoomJoinAck(), EAthena::ChatRecv::processChatRoomLeave(), EAthena::ChatRecv::processChatRoomSettings(), EAthena::ChatRecv::processColorChat(), EAthena::ChatRecv::processGmChat(), TmwAthena::ChatRecv::processGmChat(), EAthena::ChatRecv::processGmChat2(), EAthena::GuildRecv::processGuildPositionInfo(), EAthena::ChatRecv::processJoinChannel(), EAthena::PartyRecv::processPartySettings(), TmwAthena::PartyRecv::processPartySettings(), EAthena::ChatRecv::processWhisperContinue(), TmwAthena::ChatRecv::processWhisperContinue(), EAthena::ChatRecv::processWhisperResponse(), Ea::ChatRecv::processWhisperResponseContinue(), TmwAthena::BuySellHandler::requestBuyList(), TmwAthena::BuySellHandler::requestSellList(), TmwAthena::BuySellHandler::sendBuyRequest(), ShopWindow::sendMessage(), TmwAthena::BuySellHandler::sendSellRequest(), LocalPlayer::setGroupId(), PopupMenu::showChatPopup(), WhoIsOnline::slowLogic(), Being::takeDamage(), LocalPlayer::tryMagic(), InputManager::updateConditionMask(), Actions::uploadUpdate(), ChannelTab::~ChannelTab(), ChatTab::~ChatTab(), and WhisperTab::~WhisperTab().