/*************************************************************************** * Copyright (C) 2004 by Tomas Mecir * * kmuddy@kmuddy.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Library General Public License for more details. * ***************************************************************************/ #ifndef CMXPPROCESSOR_H #define CMXPPROCESSOR_H #include "libmxp.h" class cResultHandler; class cMXPState; class cMXPParser; class cEntityManager; class cElementManager; /** This class wraps the public API of the library. @author Tomas Mecir */ class cMXPProcessor { public: cMXPProcessor (); ~cMXPProcessor (); /** text processing */ void processText (const char *text); /** fetch next result of the processing */ mxpResult *nextResult (); /** are there any more results to fetch? */ bool hasResults (); /** switch to OPEN mode - use this immediately after creating this object, in case that you don't want to be in LOCKED mode by default (where MXP is only used if some line tag is received) */ void switchToOpen (); /** set default text attributes */ void setDefaultText (const char *font, int size, bool _bold, bool _italic, bool _underline, bool _strikeout, RGB fg, RGB bg); /** set attributes of header 1-6 (for tags