Recent

Author Topic: Writing a TMemo widget from scratch  (Read 1110 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 16937
  • Ceterum censeo Trump esse delendam
Re: Writing a TMemo widget from scratch
« Reply #15 on: April 23, 2025, 03:32:09 pm »
Try geany.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

paule32

  • Sr. Member
  • ****
  • Posts: 441
Re: Writing a TMemo widget from scratch
« Reply #16 on: April 23, 2025, 06:03:09 pm »
@Tommi
Sci ? it is Turbo Vision like ?
yes. there is a Port on GitHub.com - but it is hold in C++
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

Tommi

  • Full Member
  • ***
  • Posts: 236
Re: Writing a TMemo widget from scratch
« Reply #17 on: April 23, 2025, 08:27:30 pm »
Try geany.
It is based on Scintilla, so I think it is similar to SciTE.

@Tommi
Sci ? it is Turbo Vision like ?
yes. there is a Port on GitHub.com - but it is hold in C++
No Sci, SciTE, this one : https://scintilla.org/SciTE.html .

It is C++ based, but I think that should be possible to create a library that Lazarus may call.

Nicole

  • Hero Member
  • *****
  • Posts: 1095
Re: Writing a TMemo widget from scratch
« Reply #18 on: April 23, 2025, 08:38:01 pm »
Are you sure, it MUST be a TMemo?
Because this link helped me much in my first steps of text.
https://lazplanet.blogspot.com/2013/12/create-rich-text-editor-for-yourself.html

paule32

  • Sr. Member
  • ****
  • Posts: 441
Re: Writing a TMemo widget from scratch
« Reply #19 on: April 23, 2025, 08:38:32 pm »
why would you invastigate efforts into graphical systems - especially if you under Linux ?
I can not understand the real motivation.

I had done some Applications with C++ Turbo Vision under MS-DOS, Windows, and yeah: Linux.

I forget to refer to:  https://github.com/magiblot/tvision

it is a Turbo Vision Port. But don't ask me, if it supports 100 MByte in size Text Files.
But I know, it is not limited to 64 KiBytes like in the original Library.
The repro there supports Linux and Windows.

When you scroll down the site, you can pick up a shot with unicode signs - the smilelies one...
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11139
  • Debugger - SynEdit - and more
    • wiki
Re: Writing a TMemo widget from scratch
« Reply #20 on: April 25, 2025, 01:05:29 pm »
I just had a play with Notepad++ compared to SynEdit on extreme long lines.

Not trying to make either a better choice. Just comparing. They both have their flaws. So it comes down to wich flaws are more acceptable.

With SynEdit (plain on a form, no Highlight, markup or wrapping) on my PC (6years old) I could edit lines with up to between 5 and 8 million chars per line (before noticeable slowdown).
Notepad++ shows first slow down around 20 million chars per line.
SynEdit in the IDE slows down between 1 and 2 million, due to the massive amount of highlighting (even with highlighter = none, there still are markups).

But, Notepad++ does not handle RTL text (e.g. Arabic) well. Though I have to say, I don't speak/write/read Arabic (or any RTL language), so I can't tell how well SynEdit does. And SynEdit does not support all RTL features either (e.g. text and lines are always left aligned, only inside the line can there be changes to RTL, but that afaik works).
Notepad++ shows the caret at the wrong pos for RTL, and if you type the new chars appear some other place in the text. Of course, I don't know if that is Notepad++ or Scintilla (I did update my Notepad++ just today)

Notepad++ also skips recalculating the horizontal scrollbar. If I have 2 lines 20M and 30M, and I delete the 30M, then the scrollbar still scrolls to to pos 30M. Well, that can be seen as an ok optimisation.

On the other hand, Notepad++ deals with non-monospaced fonts. So thats a point for it.


 

TinyPortal © 2005-2018