[Lazarus] SynEdit question (IFDEF SYN_LAZARUS)

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jun 26 20:01:14 CEST 2008


On Thu, 26 Jun 2008 15:44:08 +0100
Martin Friebe <lazarus at mfriebe.de> wrote:

> 
> > Yes. And we need markers for live templates. For example some green
> > blocks and some red blocks.
> > The HighlightAll markers can be used for identifier references too.
> >   
> Not sure what you refer too.

identifier: When the cursor moves over an identifier (e.g. a variable
'i'), the IDE highlights all visible 'i'.

live templates: When a code template with parameters is added the IDE
adds the template and all parameter fields are highlighted. For example:

for $Prompt(1):=Low($Prompt(2)) to High($Prompt(2)) do

When the IDE adds it, it replaces the Prompt macros with markers. One
color for each different Prompt macro. Then the user can fill the
macros and jump with the Tab key between the fields.

 
> But it will probably work. Not necessarily with the highlight all
> (which is search based).
> 
> But it should be easy once I have an  SynEditTextMarkup object.
> The idea is that it provides functions like
> MarkupStyleAndColorAtPos( XPosInLine ) : SomeStyleInfo;

Maybe better GetMarkupAttriAtRowCol, similar to
GetHighlighterAttriAtRowCol?

> XPosOfNextMarkupChange( CurrentXPosInLine ) : integer;
> 
> Then while adding a token, to the token akku, it would be splitted
> (if needed) and the markup applied.
> => so any other (non Language (eg non-pascal, non-html,...)) Markup, 
> could be done in there.

Great.

 
> I'll post more, once I converted my current proto-type, to support
> this.
 

Mattias



More information about the Lazarus mailing list