Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: mmkider on January 04, 2009, 03:51:54 pm

Title: cbEVT_EDITOR_NEW_LINE event ?
Post by: mmkider on January 04, 2009, 03:51:54 pm
Hi codeblocks team,
Breakpoint and bookmark need cbEVT_EDITOR_NEW_LINE event for change location.
But I can't find cbEVT_EDITOR_NEW_LINE event.
Any solutions?

Thank you for your reply.


Title: Re: cbEVT_EDITOR_NEW_LINE event ?
Post by: MortenMacFly on January 04, 2009, 04:58:13 pm
Any solutions?
You may want to provide a patch accordingly - have a look how the other cbEVT_EDITOR_XXX events are implemented.

But are you aware that this event would be thrown ~ a million times and would certainly cost performance?
Title: Re: cbEVT_EDITOR_NEW_LINE event ?
Post by: thomas on January 05, 2009, 09:32:00 am
I would not worry about performance in this case, since an event is sent for every editor update already, which is whenever you hit a key or move the mouse.
It kind of makes a separate "new line" event obsolete, however. The editor implements the "smart indent" feature (which basically needs a "new line event") using the editor update event too.
Title: Re: cbEVT_EDITOR_NEW_LINE event ?
Post by: dje on January 05, 2009, 11:07:49 am
Hi !

Don't forget to manage copy/paste events that can introduce new lines!
I don't know if new lines events are triggered only when a carriage return keypress is detected...

Dje
Title: Re: cbEVT_EDITOR_NEW_LINE event ?
Post by: mmkider on January 05, 2009, 04:10:09 pm
Now I have only thought of the three applications(Bookmarks、Breakpoint、Navigate Forward and Navigate Backward)

However, I think that the SDK of codeblocks more clearly in the delivery of cbEVT_EDITOR_NEW_LINE(S?).

I feel that many problems to be considered for the implementation of the cbEVT_EDITOR_NEW_LINE(S?).

Thank you for your response.