Difference between revisions of "API Mouse.GetPosition2D"

From Flowcode Help
Jump to navigationJump to search
(XML import of API auto-gen)
(XML import)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
<sidebar>API Contents</sidebar>
 
Gets the X/Y position of the mouse in screen coords
 
Gets the X/Y position of the mouse in screen coords
  
 +
<div style="width:25%; float:right" class="toc">
 +
====Class hierarchy====
 +
[[API Mouse|Mouse]]
 +
:[[API Mouse|GetPosition2D]]
 +
</div>
 +
__TOC__
  
===Parameters===
+
==Parameters==
''[[Variable types|LONG]] X''
+
[[Variable Types|LONG]] ''X''
 +
:Pixel screen coordinate from the left of the panel area
 
:''This parameter is returned back to the caller''
 
:''This parameter is returned back to the caller''
:Pixel screen coordinate from the left of the panel area
 
  
''[[Variable types|LONG]] Y''
+
[[Variable Types|LONG]] ''Y''
 +
:Pixel screen coordinate from the top of the panel area
 
:''This parameter is returned back to the caller''
 
:''This parameter is returned back to the caller''
:Pixel screen coordinate from the top of the panel area
 
  
===Return value===
+
 
[[Variable types|HANDLE]]
+
==Return value==
 +
[[Variable Types|HANDLE]]
  
 
Returns the X/Y position of the mouse in screen coords
 
Returns the X/Y position of the mouse in screen coords
  
===Detailed description===
 
''No additional information''
 
  
===Examples===
+
==Detailed description==
====Calling in a calculation====
+
This gets the X/Y position in screen units relative to the top left corner of the panel the mouse is over. If the mouse is not over a panel the last known position is used.
 +
 
 +
 
 +
Note that the coordinates returned from this call are ''not'' 3D coordinates.
 +
 
 +
 
 +
==Examples==
 +
===Calling in a calculation===
 
* Declare a variable 'result' of type HANDLE
 
* Declare a variable 'result' of type HANDLE
* Add to a calculation icon: <pre class="brush:[C]">result = ::Mouse.GetPosition2D(return_x, return_y)</pre>
+
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Mouse.GetPosition2D(return_x, return_y)</pre>
 +
 
 +
''<span style="color:red;">No additional examples</span>''

Latest revision as of 15:57, 16 January 2014

<sidebar>API Contents</sidebar> Gets the X/Y position of the mouse in screen coords

Class hierarchy

Mouse

GetPosition2D

Parameters

LONG X

Pixel screen coordinate from the left of the panel area
This parameter is returned back to the caller

LONG Y

Pixel screen coordinate from the top of the panel area
This parameter is returned back to the caller


Return value

HANDLE

Returns the X/Y position of the mouse in screen coords


Detailed description

This gets the X/Y position in screen units relative to the top left corner of the panel the mouse is over. If the mouse is not over a panel the last known position is used.


Note that the coordinates returned from this call are not 3D coordinates.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Mouse.GetPosition2D(return_x, return_y)

No additional examples