I am trying to make a similar thing where I am trying to parse a few data and image tags in the application can you help me if you have got a solution to this problem ...
HandleCursorOverParserL() is related to internal CEikParserManager and parser management inside the Richtext editor. To understand how rich text editor works with its observers, please use Nokia Communicator 9210 SDK DebugSource\ckon\ctlsrc content. I attach it here.
To get an understanding of the MEikEdwinObserver based
CEikParserManager class, I copy the source and the header from the Nokia 9210 Communicator SDK here:
class CEikParserManager : public CBase, public MEikEdwinObserver
{
public:
static CEikParserManager* NewL(CEikRichTextEditor& aEditor);
~CEikParserManager();
public:
void SetParserObserver(MEikRichTextEditorParserObserver* aObserver);
void Start(TInt aStartPos,TInt aLength);
private:
CEikParserManager(CEikRichTextEditor& aEditor);
void ConstructL();
void Start();
void StartTimer();
void Reset();
static TInt ParseTextCallbackL(TAny* aSelf);
void ParseTextL();
private: // from MEikEdwinObserver
void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
private:
CPeriodic* iTimer;
CEikRichTextEditor& iEditor;
MEikRichTextEditorParserObserver* iParserObserver;
TInt iStartPos; // start of changed area
TInt iLength; // length of changed area
MParser* iParser;
TInt iTagStart; // start of tag cursor is over
TInt iTagLength; // length of tag cursor is over
TBool iStateChanged;
};
I attach the source. It may not compile and varies between Nokia platforms, but it gives a general understanding how to create your parser.