Recent

Author Topic: Scintilla text editor  (Read 3764 times)

chucky

  • New Member
  • *
  • Posts: 30
Scintilla text editor
« on: September 24, 2017, 11:54:32 pm »
I wrote a pure windows api program that uses the scintilla text editor and it works fine but I wanted to use the LCL and put the scintilla text editor in a form. Cant figure out out to do this. I guess I have to gain control of the windows message loop in order to get the messages routed to the editor.

How does one go about embedding a windows control using createwindowex and then getting messages to the control.

Or should a create a new lcl component?

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: Scintilla text editor
« Reply #1 on: September 25, 2017, 01:38:03 pm »
ATSynEdit is written for new text editors
http://wiki.freepascal.org/ATSynEdit

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Scintilla text editor
« Reply #2 on: September 25, 2017, 03:41:31 pm »
Or should a create a new lcl component?

Wrapping the Scintilla dynamic library in an LCL control would be a good way to maximize its potential usefulness. Your LCL control could then installed in Lazarus and used in the form designer. You also have the possibility of adding support for Mac (Cocoa widgetset) and Linux (Qt widgetset):  http://www.scintilla.org/ScintillaDoc.html

See the LCL implementation on Win32 of similar controls like TCustomMemo (immediate ancestor or TMemo) in files win32wsstdctrls.pp, etc.

For a fairly simple example of an LCL control with Cocoa and Qt implementations, see TWebBrowser here:

https://macpgmr.github.io/MacXPlatform/lclwebbrowser-src.zip

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Scintilla text editor
« Reply #3 on: September 25, 2017, 03:56:41 pm »

 

TinyPortal © 2005-2018