Home Download Buy Blog Forum Support

Selection Region Direction

Selection Region Direction

Postby jps on Sat Oct 03, 2009 9:08 am

As you likely know if you're reading this section on the forums, selection regions are directed, going from left to right or right to left. There's also a primary end to the region: currently this is the 'a' member, and the betas are indicating which end of the region this is by drawing a caret there.

I'd like to change the primary end of the region from a to b: this means that a region like (3, 11) will have the right hand side highlighted, instead of the left hand side as it would be today. This is because by default, anyone writing a plugin will tend to generate regions where the first number is the smaller one, but it generally makes more sense for the right hand side to be highlighted. As far as I know, the only code that assigns a meaning to a vs b is shift+arrows, and the selection region rendering. I don't _think_ any plugins care about this.

Would changing the primary end from a to b break any plugins that I'm not aware of?
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Selection Region Direction

Postby jps on Sun Oct 04, 2009 3:33 pm

This is now done in 20091004
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Selection Region Direction

Postby jps on Mon Oct 05, 2009 6:58 am

begin() and end() shouldn't have changed, as they always return values such that begin() <= end(). Only direct uses of a and b should have changed.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests