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

List:       kwrite-devel
Subject:    Re: MovingCursor + Ranges, Features
From:       Christoph Cullmann <cullmann () absint ! de>
Date:       2010-04-21 18:19:57
Message-ID: 4BCF41CD.9050400 () absint ! de
[Download RAW message or body]

Christoph Cullmann wrote:
> On Wednesday 21 April 2010 10:31:50 Michel Ludwig wrote:
>   
>> On Wednesday 21 April 2010 09:17:44 Christoph Cullmann wrote:
>>     
>>> I think about implementing caret and mouse enter, but first must look, if
>>> that really is efficient, atm I did already part of that, for internal
>>> dynamic hl. At the moment looks still quiet efficient, even with
>>> document were you have 20k ranges ;)
>>>       
>> Wow, that's cool :-)
>>     
> :) Guess performance will not degrade much, if I do the events you need, just 
> need to collect then some more ranges.
> But will first take a look and then try it.
>   
We have now a feedback class ;)

class KTEXTEDITOR_EXPORT MovingRangeFeedback
{
  public:
    /**
     * Default constructor
     */
    MovingRangeFeedback ();

    /**
     * Virtual destructor
     */
    virtual ~MovingRangeFeedback ();
   
    /**
     * The range is now empty (ie. the start and end cursors are the same).
     * If the range has invalidateIfEmpty set, this will never be
emitted, but instead rangeInvalid is triggered.
     *
     * \param range pointer to the range which generated the notification.
     */
    virtual void rangeEmpty (MovingRange* range);
   
    /**
     * The range is now invalid (ie. the start and end cursors are invalid).
     *
     * \param range pointer to the range which generated the notification.
     */
    virtual void rangeInvalid (MovingRange* range);

    /**
     * The mouse cursor on \a view entered \p range.
     *
     * \param range pointer to the range which generated the notification.
     * \param view view over which the mouse moved to generate the
notification
     */
    virtual void mouseEnteredRange (MovingRange* range, View* view);

    /**
     * The mouse cursor on \a view exited \p range.
     *
     * \param range pointer to the range which generated the notification.
     * \param view view over which the mouse moved to generate the
notification
     */
    virtual void mouseExitedRange (MovingRange* range, View* view);

    /**
     * The caret on \a view entered \p range.
     *
     * \param range pointer to the range which generated the notification.
     * \param view view over which the mouse moved to generate the
notification
     */
    virtual void caretEnteredRange (MovingRange* range, View* view);

    /**
     * The caret on \a view exited \p range.
     *
     * \param range pointer to the range which generated the notification.
     * \param view view over which the mouse moved to generate the
notification
     */
    virtual void caretExitedRange (MovingRange* range, View* view);
};

Should be all implemented quiet efficient, guess the mouse and caret
events can be made even faster, too much function calls still, could do
one in editEnd instead of one for each changed range, does anyway only
cache that after the calls.

Any more wishs?

Greetings
Christoph

-- 
-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann@AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel

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

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