Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-11

[SynEdit] Highlight full line when using background color

11 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Zaher Dirkey

Hi,
Is it possible when set a background color of the comment (for example) to highlight the full line to make it prettier.
I am not talking in LazarusIDE, it is in SynEdit because I use it in my project 'miniedit'.

Example images attached

?Thanks in advance.?

Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/92bc3f60/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: highlight-full-line.PNG
Type: image/png
Size: 9474 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/92bc3f60/attachment-0002.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: highlight-full-line-guess.PNG
Type: image/png
Size: 9394 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/92bc3f60/attachment-0003.png>

Reply by email

Martin
to Zaher Dirkey
Zaher Dirkey wrote 5 lines
Hi, Is it possible when set a background color of the comment (for example) to highlight the full line to make it prettier. I am not talking in LazarusIDE, it is in SynEdit because I use it in my project 'miniedit'.

Not currently.
Needs to be implemented.

Currently TLazSynPaintTokenBreaker.GetNextHighlighterTokenEx generates a dummy token for the end of line. It would need to get the info from the HIghlighter.

Show quoted text 13 lines
Example images attached Thanks in advance. Zaher Dirkey -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/7996ef41/attachment.html>

Reply by email

Martin
to Martin
Martin wrote 12 lines
On 05/11/2013 10:36, Zaher Dirkey wrote: > Hi, > Is it possible when set a background color of the comment (for > example) to highlight the full line to make it prettier. > I am not talking in LazarusIDE, it is in SynEdit because I use it in > my project 'miniedit'. Not currently. Needs to be implemented. Currently TLazSynPaintTokenBreaker.GetNextHighlighterTokenEx generates a dummy token for the end of line. It would need to get the info from the HIghlighter.

Try attached patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/b89511e8/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: syn_comment_full_line_hl.patch
Type: text/x-diff
Size: 5034 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/b89511e8/attachment.bin>

Reply by email

Martin
to Martin
Martin wrote 15 lines
On 05/11/2013 10:59, Martin wrote: > On 05/11/2013 10:36, Zaher Dirkey wrote: >> Hi, >> Is it possible when set a background color of the comment (for >> example) to highlight the full line to make it prettier. >> I am not talking in LazarusIDE, it is in SynEdit because I use it in >> my project 'miniedit'. > Not currently. > Needs to be implemented. > > Currently TLazSynPaintTokenBreaker.GetNextHighlighterTokenEx > generates a dummy token for the end of line. It would need to get the > info from the HIghlighter. Try attached patch.

Only for pascal.

for other languages, you need to change the highlighters -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/ae7d2a49/attachment.html>

Reply by email

Zaher Dirkey
to Martin

Yes, thanks :) that is too fast, it is working on my PHP highlighter too, see the attachment.

Only the last line, but it is fine like that.

Thanks again.

Martin wrote 34 lines
On 05/11/2013 12:35, Martin wrote: On 05/11/2013 10:59, Martin wrote: On 05/11/2013 10:36, Zaher Dirkey wrote: Hi, Is it possible when set a background color of the comment (for example) to highlight the full line to make it prettier. I am not talking in LazarusIDE, it is in SynEdit because I use it in my project 'miniedit'. Not currently. Needs to be implemented. Currently TLazSynPaintTokenBreaker.GetNextHighlighterTokenEx generates a dummy token for the end of line. It would need to get the info from the HIghlighter. Try attached patch. Only for pascal. for other languages, you need to change the highlighters -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/5c2cd888/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: highlight-full-line-work.PNG Type: image/png Size: 9311 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/5c2cd888/attachment-0001.png>

Reply by email

Zaher Dirkey
to Zaher Dirkey

Off topic, In my PHP highlighter I use special documentation comment that started with /** and normal comment highlight started with /* The idea I used the comments to ignore the code while the documentation need to be read by developers.
If I set the comment to be gray on white it is easy for my eyes to ignore it, while the documentation must be readable.

Best regards

Zaher Dirkey wrote 52 lines
Yes, thanks :) that is too fast, it is working on my PHP highlighter too, see the attachment. Only the last line, but it is fine like that. Thanks again. On Tue, Nov 5, 2013 at 2:42 PM, Martin wrote: > On 05/11/2013 12:35, Martin wrote: > > On 05/11/2013 10:59, Martin wrote: > > On 05/11/2013 10:36, Zaher Dirkey wrote: > > Hi, > Is it possible when set a background color of the comment (for example) > to highlight the full line to make it prettier. > I am not talking in LazarusIDE, it is in SynEdit because I use it in my > project 'miniedit'. > > Not currently. > Needs to be implemented. > > Currently TLazSynPaintTokenBreaker.GetNextHighlighterTokenEx generates a > dummy token for the end of line. It would need to get the info from the > HIghlighter. > > > Try attached patch. > > > Only for pascal. > > for other languages, you need to change the highlighters > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/a190dd34/attachment.html>

Reply by email

Martin
to Zaher Dirkey: Yes, thanks :) that is too fast, it is working on my PHP highlighter too, see the…
Zaher Dirkey wrote 5 lines
Yes, thanks :) that is too fast, it is working on my PHP highlighter too, see the attachment. Only the last line, but it is fine like that.

If it works, without the php hl having been modified, then that is actually a bug somewhere.

The HL has to implement
GetEndOfLineAttribute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/0543efd2/attachment.html>

Reply by email

Martin
to Zaher Dirkey
Zaher Dirkey wrote 13 lines
On Tue, Nov 5, 2013 at 4:08 PM, Martin < <mailto:>> wrote: If it works, without the php hl having been modified, then that is actually a bug somewhere. No, I overrided GetEndOfLineAttribute http://sourceforge.net/p/minilib/source/ci/3779ce6da972fb5aa2b0491872d5232dcb391c0e/

So then you could store somewhere, if the last thing before eol, was the closing comment.

And return the comment attri for the last line too in that case. If you want that last line to be highligted completely
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/ab6a9778/attachment.html>

Reply by email

Zaher Dirkey
to Martin
Martin wrote 5 lines
So then you could store somewhere, if the last thing before eol, was theclosing comment. And return the comment attri for the last line too in that case. If youwant that last line to be highligted completely

?
Yes, ?I will try it later?, Thanks :)

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/044b74a9/attachment-0001.html>

Reply by email

Zaher Dirkey
to Zaher Dirkey

Yes I made the last line full highlight.
http://sourceforge.net/p/minilib/source/ci/42d6ed89e2d52b2d8ef681d8c87f2b147a7c428f/

Thanks again.

Zaher Dirkey wrote 14 lines
On Tue, Nov 5, 2013 at 4:22 PM, Martin wrote: > So then you could store somewhere, if the last thing before eol, was theclosing comment. > > And return the comment attri for the last line too in that case. If youwant that last line to be > highligted completely > ? Yes, ?I will try it later?, Thanks :) Best Regards Zaher Dirkey
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131105/735c78c6/attachment.html>

Reply by email