Recent

Author Topic: ATSynEdit 0.1  (Read 4658 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2406
    • UVviewsoft
ATSynEdit 0.1
« on: April 11, 2015, 01:55:06 am »
I think Proj is stable and minor issues fixed
https://github.com/Alexey-T/ATSynEdit

Shot: tab chars, bookmarks, unprinted chars..
https://github.com/Alexey-T/ATSynEdit/raw/master/screen.png?raw=true


It's control which will be able to syntax-hilite text, I plan to support a) SynWrite lexers, b) binary SynEdit
lexers, but it's later. Now it's only mul-line editor with plain text, with support for many options, with selections, but no:
- syntax hilite
- fodling
Hilite/folding ll be later.

To use you must make objects like
Code: [Select]
  ed:= TATSynEdit.Create(Self);
  ed.Parent:= Self;
  ed.Align:= alClient;
  ed.OnChange:= @EditChange;
  ed.LoadFromFile(...)
 ...
  ed.SaveToFile(...)

One-line control: "TATEdit" instead of "TATSynEdit"
Supports Win, Linux, Mac (Mac tested week ago)
To see OPTIONS-- call demo "app\demo_editor", press "Opts"


« Last Edit: April 11, 2015, 02:10:08 am by Alextp »

AlexTP

  • Hero Member
  • *****
  • Posts: 2406
    • UVviewsoft
Re: ATSynEdit 0.1 (not syntax hiliting yet)
« Reply #1 on: April 11, 2015, 01:57:18 am »
Multi-carets:

Ctrl+click: add or del caret (no sel)
Ctrl+Shift+click: add carets column to new pos
Ctrl+drag: add caret with selection (multi-sel)

Alt+drag: column block with carets at right

Basile B.

  • Guest
Re: ATSynEdit 0.1
« Reply #2 on: April 11, 2015, 04:45:16 am »
Hello, maybe a bug: when you click on the gutter, the darker grey rectangle which indicates the current line (on the gutter) is drawn on the next line.

After a quick debug session, it looks like the problem comes from here:

https://github.com/Alexey-T/ATSynEdit/blob/master/atsynedit/atsynedit_sel.inc#L79

Code: [Select]
PosY:= P.Y+1;

Because if you remove the `+1` then the rectangle is drawn at the right place.

Also, i'm curious to know what https://github.com/Alexey-T/ATSynEdit/tree/master/app/demo_listbox_draw has to do with the project ?
« Last Edit: April 11, 2015, 04:46:56 am by Basile B. »

AlexTP

  • Hero Member
  • *****
  • Posts: 2406
    • UVviewsoft
Re: ATSynEdit 0.1
« Reply #3 on: April 11, 2015, 01:09:45 pm »
It's not a bug: logic is this: u click gutter line N, then line N selected from position 0 to start of next line N+1. caret placed after selection, to line N+1, so gray is N+1 line. It's like in editors.

I have ISSUES at github, pls use

Basile B.

  • Guest
Re: ATSynEdit 0.1
« Reply #4 on: April 11, 2015, 02:49:28 pm »
Yes, but when a line is clicked in the editor, the darker gey rectangle is displayed on the same Y coordinate ! From a final user p.o.v it looked like a bug (since the very first seconds i tried one of the example).
Anyway i won't insist more since i don't know your component at all.

AlexTP

  • Hero Member
  • *****
  • Posts: 2406
    • UVviewsoft
Re: ATSynEdit 0.1
« Reply #5 on: April 11, 2015, 03:23:00 pm »
Logic is: show gray for CARET line. If caret on line N+1, show gray on N+1. And caret is on line N+1

AlexTP

  • Hero Member
  • *****
  • Posts: 2406
    • UVviewsoft
Re: ATSynEdit 0.1
« Reply #6 on: April 14, 2015, 05:07:43 am »
More now:
ATEdit (single line edit w/out syntax hilite);
ATComboEdit (like edit, with DOWN arrow at right, with Items property to fill menu of down-arrow)

 

TinyPortal © 2005-2018