ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 MouseInteract

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jrpcguru Posted - Jun 25 2019 : 19:25:08
For the few years that I've been using ImageEn, I've had a simple user interface. Double clicking toggled between MouseInteract = [miScroll] or [miSelectZoom]. I'm now using 8.6 so it is MouseInteractGeneral.

Earlier this year I began working with layers. I've found something I think is strange, perhaps not intended.

If MouseInteract contains [miSelectZoom] or MouseInteractGeneral contains it and MouseInteractLayers contains [mlResizeLayers, mlRotateLayers] or MouseInteractLayers = [] I can toggle between miSelectZoom and miScroll with the double click event as before. But if I happen to double click on a layer, even though it is not active and cannot be selected, it still shows the layer property dialog. The doubleclick event comes before LayerNotify and both receive the double click. And because the doubleclick event is activated, my code toggles between miScroll and miSelectZoom.

If layers are active, I can easily block the double click event like so:

if (mlResizeLayers in ImageEnView1.MouseInteractLayers = true) or
    (mlMoveLayers in ImageEnView1.MouseInteractLayers = true) then
    exit; 

That prevents toggling scroll and zoom when I am working with layers, but that does not work to stop toggling when I have double clicked on an inactive layer.

I would like to either block the double click from activating the layer property dialog or block it from toggling scroll/selectzoom. Either would give my user interface a more consistent feel. Another possibility would be to reactivate the layer when I double click on it.

Are any of these options possible? I have tried a bunch of stuff to detect the double click on the layer, but failed. I have no idea how to block the layer property dialog when the layers are inactive.

A related question:

Prior to 8.6, I replaced MouseInteract = [miScroll] with [mlResizeLayers, mlRotateLayers] and there was no ambiguity as to what the mouse should do.

With 8.6, should I set MouseInteractGeneral := [] when setting MouseInteractLayer := [mlResizeLayers, mlRotateLayers] and vice versa?

J.R.
2   L A T E S T    R E P L I E S    (Newest First)
jrpcguru Posted - Jun 27 2019 : 16:21:44
Thanks for the prompt reply. I came across loPropsOnDblClick when I was trying to determine what happened with a double click on a text layer. But I completely missed its broader purpose. It did the trick very nicely.

J.R.
xequte Posted - Jun 26 2019 : 01:59:40
Hi JR

You can disable double-clicking for Layer properties by calling:

ImageEnView1.LayerOptions := ImageEnView1.LayerOptions - [ loPropsOnDblClick ];

When setting MouseInteractLayers, it will clear any items in MouseInteractGeneral that are incompatible. In this case miScroll is incompatible with layer editing options so it will be automatically removed from MouseInteractGeneral (and vice versa).

Nigel
Xequte Software
www.imageen.com