CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Fri Oct 18, 2019 7:24 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Sep 17, 2019 9:52 am 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 188
Hi.
I need to get cursor coordinates for specific web-visu client in variables.
I have client context (POINTER TO VisuElems.VisuStructClientData), can I extract cursor info from this struct?

_________________
Make CODESYS great again


Top
   
PostPosted: Tue Sep 17, 2019 10:51 am 
Offline
Frequent User
Frequent User

Joined: Thu Aug 30, 2018 8:40 am
Posts: 131
Hello,

check out the example on the store https://store.codesys.com/visu-event-handler.html, especially the MouseHandler.project

Best regards,
Marcel


Top
   
PostPosted: Tue Sep 17, 2019 11:32 am 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 188
Hi, m.prestel.
In this example cursor "global" for all web-clients.
In my case I have independent clients with independent cursors.
Can you give a tip how I need to edit example in my case?

_________________
Make CODESYS great again


Top
   
PostPosted: Tue Sep 17, 2019 12:03 pm 
Offline
Frequent User
Frequent User

Joined: Thu Aug 30, 2018 8:40 am
Posts: 131
Hello,

HandleMouseMoveEvent will be called with the client where the move occurred.
IF you use CURRENTCLIENTID in your visualization, you can use pClient^.GlobalData.GlobalClientID to store the values in a array (otherwise GlobalClientID will always be -1).

For the size of the array you can use VISU_MIN_NUMBER_OF_CLIENTS & VISU_MAX_NUMBER_OF_CLIENTS
e.g.
ARRAY [VISU_MIN_NUMBER_OF_CLIENTS..VISU_MAX_NUMBER_OF_CLIENTS] OF VisuStructPoint;

Best regards,
Marcel


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited