Ivan Denisov wrote:I am adopting some of Center features for Obertone Freenix version of BlackBox.
Importing HostPorts to Text subsystem is bad idea. It breaks hermeticity of Text subsystem.
Better use Ctrl key in Track procedure.
Ivan, In principle I agree that importing HostPorts in TextRulers should be avoided
but I didn't find a better solution.
The problem with your approach is that it changes existing behavior.
Both, extend and modify, are already used for tabs.
HostPorts.right is also used in DevDependencies. It is the same problem there.
Replacing HostPorts.right by the constant 18 would be even worse, obviously.
A
clean solution would require to add another high-level modifier for mouse-right clicks to Controllers.TrackMsg.modifiers.
Something like 'context' (or 'menu' or 'properties' or 'popup') because mouse-right is usually used for opening a context menu of an object in the Windows GUI.
A simple and 'compatible by construction' approach would be to use the constant 18 (HostPorts.right) for that new modifier.
This effectively raises the platform specific concept of a mouse-right click to a high-level concept.
The ugly point here is that until now the platform specific modifiers are >= 16 (by convention) and this no longer holds then.
A cleaner approach therefore would be to add a new constant (e.g. context = 3) that is included in modifiers together with
the platform specific value HostPorts.right. I don't know if this causes any incompatibilities in existing mouse tracking procedures
but probably it will work without any problems.
I have put together an experimental clean version in issue-#163. Eventually, it will deserve a new issue because it also affects DevDependencies.
See diffs at
https://redmine.blackboxframework.org/p ... 982824bd7b.
- Josef