Recent

Author Topic: Text editor wanted  (Read 14185 times)

john60

  • New Member
  • *
  • Posts: 24
Re: Text editor wanted
« Reply #15 on: July 05, 2018, 10:27:38 pm »
hi handoko

It's not difficulty in using it that is the issue - it's the replacement code I'd need to write to replace it.
Since that isn't possible yet (the entire system doesn't exist and won't for some time) I need to
limit the complexity of the environment.
No it's not a hobby software project its an entire system - processor upwards.



 

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Text editor wanted
« Reply #16 on: July 05, 2018, 11:16:57 pm »
Well we still dont know what you aim for as end product (and understandable, you may not be allowed to say...)

Other point you might need to consider. Do you need/prefer:
- a system drawn editor (tmemo)
- a custom drawn editor (synedit)

The first just tells windows (or the OS) to do the job. It is limited to what the OS offers, and functions/look may vary by platform.

SynEdit is highly customizable. It has lots of hooks to add extra code...
If you make a copy of it, then you can also strip a lot of code out.

Btw, there is an other version of SynEdit, that has a different internal design (but I know little about it / I do not even know if it is still maintained, or works with the current Lazarus / I do not think it will be any easier).
http://wiki.lazarus.freepascal.org/SynEdit#SynEdit_2.0_port

john60

  • New Member
  • *
  • Posts: 24
Re: Text editor wanted
« Reply #17 on: July 06, 2018, 09:27:50 am »
martin_fr

I'm sure synedit does whatever you use it for very well - it's only use to me is as a stop-gap
to speed up development. If it had a good VHDL add on that would be useful - for now.

Sure I can tell you what I'm doing - there's no mystery - I'm creating a complete new
computer system from scratch.
I'm using lazarus to create some tools that will run on windows and linux to aid in development
and testing.  Those tools will need converting to the new system at some stage so the
simpler the code the better. That means avoiding anything undocumented or object based where
possible. It also means other things you'd normally just drag and drop are no good to me.
Like I said before - what I'm doing is a little bit different.



   

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Text editor wanted
« Reply #18 on: July 06, 2018, 11:37:57 am »
I'm sure synedit does whatever you use it for very well - it's only use to me is as a stop-gap
to speed up development. If it had a good VHDL add on that would be useful - for now.
You mean a highlighter?
I do not know of any existing one, but there is a tutorial http://wiki.lazarus.freepascal.org/SynEdit_Highlighter
Sample files are in the example folder.

Or you mean word completion? That you need to do yourself, but there is an example (in the example folder) on the completion add on too.

Quote
Those tools will need converting to the new system at some stage so the
simpler the code the better. That means avoiding anything undocumented or object based where
possible. It also means other things you'd normally just drag and drop are no good to me.
Like I said before - what I'm doing is a little bit different.

It depends how different. If the entire cpu/memory arch is different, and you need to change the way memory is accessed, then this will make it very hard.

Also for synedit to work, you need at least a true monospaced font. If you will not have that, then you are in trouble.

As for adapting the OS calls, that should be moderate work.
- IIRC All text drawing is done in one single unit (you may consider looking at 2): textdrawer.pas (you dont need all of it, just some)
- gutters can be removed, if you do not want to port them
- caret is in one place, and can be either system, or custom drawn
- word completion, if used would need to open an extra window
- then need to provide or fake input from the OS (keydown/up/press), mouse, focus

It is quite a list, but the mandatory parts come with any editor.

--------------------
Btw, you may want to look at mse ide too: I don't know how complex their editor is. But mse is all custom drawn (no LCL). Maybe that will be easier to port. No idea.


john60

  • New Member
  • *
  • Posts: 24
Re: Text editor wanted
« Reply #19 on: July 06, 2018, 04:34:54 pm »
VHDL would have been a handy addition but it doesn't matter.
The simple FPC highlighting will do for now.  I may take a look at the do-it yourself highlighter later.
I don't ever use word/code  completion.
By different I do mean very. 
The OS doesn't work the way you're used to any more than the hardware so
"Porting" to the system is porting concepts not code then writing from scratch.
Once again - avoiding bells and whistles is key.

I could use some icons for the buttons though  - is there a freely usable set for that
do you know?

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Text editor wanted
« Reply #20 on: July 06, 2018, 04:52:46 pm »
It is very easy to find free images from the Internet, but many of them have some license restrictions.

You may try OpenClipart first, it's license is in CC Zero Public Domain:
https://openclipart.org/

john60

  • New Member
  • *
  • Posts: 24
Re: Text editor wanted
« Reply #21 on: July 07, 2018, 10:08:03 am »
Thanks - those are a bit "flowery" for my needs but I found a set by mark james that will do nicely
at http://famfamfam.com/

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: Text editor wanted
« Reply #22 on: July 07, 2018, 10:22:15 am »
icons8 has a huge collection in various styles: https://icons8.com/icon/new-icons/all. Free, but you must provide an attribution link to their site (https://icons8.com/license/).

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: Text editor wanted
« Reply #23 on: June 22, 2019, 08:39:36 am »
Oh! I didn't see this discussion before. I have been working on something similar to IDE for an FPGA architecture and using VHDL as language.

This work has near to 10 years. I did use Synedit for the VHDL code editor. See attached images to have a look.

john60

  • New Member
  • *
  • Posts: 24
Re: Text editor wanted
« Reply #24 on: August 09, 2019, 11:02:42 pm »
very nice M.A.R.C.
If you're ever interested in sharing let me know
I'd love to take a closer look.

I use Vivado for VHDL but something a bit "cleaner" has advantages.
I can also see other uses if what I'm seeing is what I think I'm seeing.





Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Text editor wanted
« Reply #25 on: August 10, 2019, 04:31:06 am »
M.A.R.C's SBA Creator is open source, it can be found here:
https://sourceforge.net/projects/sbacreator/

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Text editor wanted
« Reply #26 on: August 10, 2019, 09:05:54 am »
M.A.R.C's SBA Creator is open source
I do not see sources of SBA Creator. Only VHDL examples, VHDL libs, and binary setups.

I would be interested if there is source for synthesis part of SBA Creator:
https://bfc64698-a-62cb3a1a-s-sites.googlegroups.com/site/simplebusarchitecture/examples/SBA_Imagen3.png

If it is available somewhere please let me know...
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

john60

  • New Member
  • *
  • Posts: 24
Re: Text editor wanted
« Reply #27 on: August 10, 2019, 01:12:10 pm »
As you say - Miguel has very generously made this open source (I havnt had time to look yet but)
try here avra:
http://sba.accesus.com/software-tools/sba-creator

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Text editor wanted
« Reply #28 on: August 10, 2019, 02:14:38 pm »
I would be interested if there is source for synthesis part of SBA Creator:
https://bfc64698-a-62cb3a1a-s-sites.googlegroups.com/site/simplebusarchitecture/examples/SBA_Imagen3.png
Image is attached just to ease the thread reading.

Edson

  • Hero Member
  • *****
  • Posts: 1302
Re: Text editor wanted
« Reply #29 on: August 10, 2019, 04:58:23 pm »
I'm using lazarus to create some tools that will run on windows and linux to aid in development
and testing.  Those tools will need converting to the new system at some stage so the
simpler the code the better. That means avoiding anything undocumented or object based where
possible.

This remimd me, the compiler I'm creating in Lazarus, to be self-compiled later. Not objects, not advanced features: http://blog.pucp.edu.pe/blog/tito/2019/01/05/crea-tu-propio-compilador-casero-parte-1/
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

 

TinyPortal © 2005-2018