Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • Twitter
  • facebook
  • reddit
  • email

How to use TLMDCharSeq Buffer?

I'm a C++ XE5 user, and purchased LMD Syntax Editor stand-alone.

I'm
replacing the visible text for large files on the TLMDEditView based on
a scroll event, and I'm looking for faster processing than I can
achieve by using 

TLMDEditDocument->Lines->Strings[i]

The
help file suggest faster processing speeds for TLMDCharSeq by using
Buffer, BufferStart, Buffer. Is this a direction I should consider?

If so, I see the Delphi example in the help file and implemented a C++ version of this sub classing.

class TSegFromPtr : public  TLMDCharSeq
{
private:
    PLMDChar FPtr;

protected:
    void __fastcall FillBuffer(int ABufferStart, int ABufferEnd)
    {
        int Bytes;
        PLMDChar Ptr;

        Bytes = (ABufferEnd-ABufferStart) * sizeof(TLMDChar);
        Ptr = FPtr + ABufferStart;
        Move((void*)Ptr,(void*)(Buffer[0]),Bytes);
        //System.Move(Ptr^, Buffer[0], Bytes);
    }

public:
    __fastcall TSegFromPtr(PLMDChar APtr, int ACount):TLMDCharSeq(256)
    {
        FPtr = APtr;
        FCount = ACount;
    }

};


How can I assign the pointer to the TLMDEditDocument or TLMDEditView on my form (if that's the next step)

TSegFromPtr *seq = ??

By the way, I would have submitted this at the forum, but I'm a new customer and I don't see that I have an invitation code.

Regards

David Sleeter

Comments

Sign In or Register to comment.