[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KTextEditor Highlighting custom area
From:       Milian Wolff <mail () milianw ! de>
Date:       2012-02-16 16:31:35
Message-ID: 2902764.MyGDLnfGka () minime
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 16 February 2012 19:24:11 Alex Turbov wrote:
> On Thu, Feb 16, 2012 at 4:00 PM, Dominik Haumann <dhaumann@kde.org> wrote:
> > So basically it's
> > 1. get the MovingInterface,
> > 2. create a newMovingRange,
> > 3. set the attributes.
> > 
> > All this is thoroughly documented in the API documentation (MovingRange,
> > MovingInterface):
> > 
> > http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/gr
> > oup__kte__group__moving__classes.html
> Dominik, is there any way to get configured (standard) attributes? for
> example how to get Attribute::Ptr instance (w/ fg/bg) for 'Errors'?

HighlightInterface::defaultStyle(dsError)

http://api.kde.org/4.x-api/kde-baseapps-
apidocs/kate/ktexteditor/html/classKTextEditor_1_1HighlightInterface.html#a6698e160768ca97752d7100ef8b77e15


> and another one case: how to get attributes for a particular range
> (according current highligthing) ?

Again HighlightInterface, using lineAttributes this time. Then check the 
.start/.length properties of the returned AttributeBlock if you want some 
subrange of that line.

bye

-- 
Milian Wolff
mail@milianw.de
http://milianw.de


["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic