Recent

Author Topic: SynEdit How to add 'Declaration Hint' for functions  (Read 2867 times)

Zaher

  • Hero Member
  • *****
  • Posts: 642
    • parmaja.org
SynEdit How to add 'Declaration Hint' for functions
« on: August 29, 2021, 04:12:20 pm »
In TSynEdit I want to show hint inside function/procedure call, like Parameters and it is Declaration, is there something exists to help me to do?
I can not find it in the forum or examples.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7434
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit How to add 'Declaration Hint' for functions
« Reply #1 on: August 30, 2021, 04:18:06 pm »
If you mean, how to get the content: This is done by codetools in the IDE. It is not part of SynEdit.

If you got the text, then (afaik) you can set it to SynEdit.Hint (if memory serves...).

If you want a more fancy hint (like the IDE), then you need to open and paint your own hint. In the IDE "ide/sourceeditor.pp" use some html panel for that.


You can walk the pas highlighter to find procedures, but still need to parse them afterwards. But unlike codetool, that fails when there are certain $IFDEF.

Codetools have a test dir. Maybe that has some hints how to use them.... No idea, not looked at it myself.

Zaher

  • Hero Member
  • *****
  • Posts: 642
    • parmaja.org
Re: SynEdit How to add 'Declaration Hint' for functions
« Reply #2 on: August 31, 2021, 11:40:41 pm »
a hit something like this, adding a hint of functions params

Zaher

  • Hero Member
  • *****
  • Posts: 642
    • parmaja.org
Re: SynEdit How to add 'Declaration Hint' for functions
« Reply #3 on: August 31, 2021, 11:42:03 pm »
if not exists i will try to add simple one in TSynEdit addon,
I remember TSynEdit of Delphi have it, I am thinking to port it

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7434
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit How to add 'Declaration Hint' for functions
« Reply #4 on: September 01, 2021, 03:08:05 am »
That hint is done by codetools (text/content), TurboPowerIpro (gfx/paint).

 

TinyPortal © 2005-2018