<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2022</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxMouseEvent</title>
</header>
<module>wxMouseEvent</module>
<modulesummary>Functions for wxMouseEvent class</modulesummary>
<description><p>This event class contains information about the events generated by the mouse: they include mouse buttons press and release events and mouse move events.
      </p><p>All mouse events involving the buttons use <c>wxMOUSE_BTN_LEFT</c> for the left mouse button, <c>wxMOUSE_BTN_MIDDLE</c> for the middle one and <c>wxMOUSE_BTN_RIGHT</c> for the right one. And if the system supports more buttons, the <c>wxMOUSE_BTN_AUX1</c> and <c>wxMOUSE_BTN_AUX2</c> events can also be generated. Note that not all mice have even a middle button so a portable application should avoid relying on the events from it (but the right button click can be emulated using the left mouse button with the control key under Mac platforms with a single button mouse).
      </p><p>For the <c>wxEVT_ENTER_WINDOW</c> and <c>wxEVT_LEAVE_WINDOW</c> events purposes, the mouse is considered to be inside the window if it is in the window client area and not inside one of its children. In other words, the parent window receives <c>wxEVT_LEAVE_WINDOW</c> event not only when the mouse leaves the window entirely but also when it enters one of its children.
      </p><p>The position associated with a mouse event is expressed in the window coordinates of the window which generated the event, you can use <seemfa marker="wxWindow#clientToScreen/3"><c>wxWindow:clientToScreen/3</c></seemfa> to convert it to screen coordinates and possibly call <seemfa marker="wxWindow#screenToClient/2"><c>wxWindow:screenToClient/2</c></seemfa> next to convert it to window coordinates of another window.
      </p><p>Note: Note the difference between methods like <seemfa marker="#leftDown/1"><c>leftDown/1</c></seemfa> and the inherited <seemfa marker="#leftIsDown/1"><c>leftIsDown/1</c></seemfa>: the former returns true when the event corresponds to the left mouse button click while the latter returns true if the left mouse button is currently being pressed. For example, when the user is dragging the mouse you can use <seemfa marker="#leftIsDown/1"><c>leftIsDown/1</c></seemfa> to test whether the left mouse button is (still) depressed. Also, by convention, if <seemfa marker="#leftDown/1"><c>leftDown/1</c></seemfa> returns true, <seemfa marker="#leftIsDown/1"><c>leftIsDown/1</c></seemfa> will also return true in wxWidgets whatever the underlying GUI behaviour is (which is platform-dependent). The same applies, of course, to other mouse buttons as well.
      </p><p>See: <seeerl marker="wxKeyEvent"><c>wxKeyEvent</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxEvent"><c>wxEvent</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_mouse_event.html">wxMouseEvent</url></p>
  </description><section><title>Events</title><p>Use <seemfa marker="wxEvtHandler#connect/3"><c>wxEvtHandler:connect/3</c></seemfa> with <seetype marker="#wxMouseEventType"><c>wxMouseEventType</c></seetype> to subscribe to events of this type.</p></section>
<datatypes>
    <datatype><name name="wxMouseEvent"/></datatype>
    <datatype><name name="wxMouse"/></datatype>
    <datatype><name name="wxMouseEventType"/></datatype></datatypes>

<funcs>
  <func>
    <name name="altDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the Alt key is pressed. </fsummary>
    <desc><p>Returns true if the Alt key is pressed. 
      </p><p>Notice that <seemfa marker="wxKeyEvent#getModifiers/1"><c>wxKeyEvent:getModifiers/1</c></seemfa> should usually be used instead of this one. 
      </p></desc>
  </func>
  
  <func>
    <name name="button" arity="2" clause_i="1" since=""/>
    <fsummary>Returns true if the event was generated by the specified button. </fsummary>
    <desc><p>Returns true if the event was generated by the specified button. 
      </p><p>See: wxMouseState::ButtoinIsDown()
      </p></desc>
  </func>
  
  <func>
    <name name="buttonDClick" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>buttonDClick/2</c></fsummary>
  </func>
  
  <func>
    <name name="buttonDClick" arity="2" clause_i="1" since=""/>
    <fsummary>If the argument is omitted, this returns true if the event was a mouse double click event. </fsummary>
    <desc><p>If the argument is omitted, this returns true if the event was a mouse double click event. 
      </p><p>Otherwise the argument specifies which double click event was generated (see <seemfa marker="#button/2"><c>button/2</c></seemfa> for the possible values). 
      </p></desc>
  </func>
  
  <func>
    <name name="buttonDown" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>buttonDown/2</c></fsummary>
  </func>
  
  <func>
    <name name="buttonDown" arity="2" clause_i="1" since=""/>
    <fsummary>If the argument is omitted, this returns true if the event was a mouse button down event. </fsummary>
    <desc><p>If the argument is omitted, this returns true if the event was a mouse button down event. 
      </p><p>Otherwise the argument specifies which button-down event was generated (see <seemfa marker="#button/2"><c>button/2</c></seemfa> for the possible values). 
      </p></desc>
  </func>
  
  <func>
    <name name="buttonUp" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>buttonUp/2</c></fsummary>
  </func>
  
  <func>
    <name name="buttonUp" arity="2" clause_i="1" since=""/>
    <fsummary>If the argument is omitted, this returns true if the event was a mouse button up event. </fsummary>
    <desc><p>If the argument is omitted, this returns true if the event was a mouse button up event. 
      </p><p>Otherwise the argument specifies which button-up event was generated (see <seemfa marker="#button/2"><c>button/2</c></seemfa> for the possible values). 
      </p></desc>
  </func>
  
  <func>
    <name name="cmdDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the key used for command accelerators is pressed. </fsummary>
    <desc><p>Returns true if the key used for command accelerators is pressed. 
      </p><p>Same as <seemfa marker="#controlDown/1"><c>controlDown/1</c></seemfa>. Deprecated.
      </p><p>Notice that <seemfa marker="wxKeyEvent#getModifiers/1"><c>wxKeyEvent:getModifiers/1</c></seemfa> should usually be used instead of this one. 
      </p></desc>
  </func>
  
  <func>
    <name name="controlDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the Control key or Apple/Command key under macOS is pressed. </fsummary>
    <desc><p>Returns true if the Control key or Apple/Command key under macOS is pressed. 
      </p><p>This function doesn't distinguish between right and left control keys.
      </p><p>Notice that <seemfa marker="wxKeyEvent#getModifiers/1"><c>wxKeyEvent:getModifiers/1</c></seemfa> should usually be used instead of this one. 
      </p></desc>
  </func>
  
  <func>
    <name name="dragging" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if this was a dragging event (motion while a button is depressed). </fsummary>
    <desc><p>Returns true if this was a dragging event (motion while a button is depressed). 
      </p><p>See: <seemfa marker="#moving/1"><c>moving/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="entering" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the mouse was entering the window. </fsummary>
    <desc><p>Returns true if the mouse was entering the window. 
      </p><p>See: <seemfa marker="#leaving/1"><c>leaving/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getButton" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the mouse button which generated this event or <c>wxMOUSE_BTN_NONE</c> if no button is involved (for mouse move, enter or leave event, for example). </fsummary>
    <desc><p>Returns the mouse button which generated this event or <c>wxMOUSE_BTN_NONE</c> if no button is involved (for mouse move, enter or leave event, for example). 
      </p><p>Otherwise <c>wxMOUSE_BTN_LEFT</c> is returned for the left button down, up and double click events, <c>wxMOUSE_BTN_MIDDLE</c> and <c>wxMOUSE_BTN_RIGHT</c> for the same events for the middle and the right buttons respectively. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPosition" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the physical mouse position. </fsummary>
    <desc><p>Returns the physical mouse position. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLogicalPosition" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled). </fsummary>
    <desc><p>Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled). 
      </p></desc>
  </func>
  
  <func>
    <name name="getLinesPerAction" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the configured number of lines (or whatever) to be scrolled per wheel action. </fsummary>
    <desc><p>Returns the configured number of lines (or whatever) to be scrolled per wheel action. 
      </p><p>Default value under most platforms is three.
      </p><p>See: <c>GetColumnsPerAction()</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="getWheelRotation" arity="1" clause_i="1" since=""/>
    <fsummary>Get wheel rotation, positive or negative indicates direction of rotation. </fsummary>
    <desc><p>Get wheel rotation, positive or negative indicates direction of rotation. 
      </p><p>Current devices all send an event when rotation is at least +/-WheelDelta, but finer resolution devices can be created in the future.
      </p><p>Because of this you shouldn't assume that one event is equal to 1 line, but you should be able to either do partial line scrolling or wait until several events accumulate before scrolling. 
      </p></desc>
  </func>
  
  <func>
    <name name="getWheelDelta" arity="1" clause_i="1" since=""/>
    <fsummary>Get wheel delta, normally 120. </fsummary>
    <desc><p>Get wheel delta, normally 120. 
      </p><p>This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta. 
      </p></desc>
  </func>
  
  <func>
    <name name="getX" arity="1" clause_i="1" since=""/>
    <fsummary>Returns X coordinate of the physical mouse event position. </fsummary>
    <desc><p>Returns X coordinate of the physical mouse event position. 
      </p></desc>
  </func>
  
  <func>
    <name name="getY" arity="1" clause_i="1" since=""/>
    <fsummary>Returns Y coordinate of the physical mouse event position. </fsummary>
    <desc><p>Returns Y coordinate of the physical mouse event position. 
      </p></desc>
  </func>
  
  <func>
    <name name="isButton" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the event was a mouse button event (not necessarily a button down event - that may be tested using <c>buttonDown/2</c>). </fsummary>
    <desc><p>Returns true if the event was a mouse button event (not necessarily a button down event - that may be tested using <seemfa marker="#buttonDown/2"><c>buttonDown/2</c></seemfa>). 
      </p></desc>
  </func>
  
  <func>
    <name name="isPageScroll" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling. </fsummary>
    <desc><p>Returns true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling. 
      </p></desc>
  </func>
  
  <func>
    <name name="leaving" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the mouse was leaving the window. </fsummary>
    <desc><p>Returns true if the mouse was leaving the window. 
      </p><p>See: <seemfa marker="#entering/1"><c>entering/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="leftDClick" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the event was a left double click. </fsummary>
    <desc><p>Returns true if the event was a left double click. 
      </p></desc>
  </func>
  
  <func>
    <name name="leftDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the left mouse button changed to down. </fsummary>
    <desc><p>Returns true if the left mouse button changed to down. 
      </p></desc>
  </func>
  
  <func>
    <name name="leftIsDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the left mouse button is currently down. </fsummary>
    <desc><p>Returns true if the left mouse button is currently down. 
      </p></desc>
  </func>
  
  <func>
    <name name="leftUp" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the left mouse button changed to up. </fsummary>
    <desc><p>Returns true if the left mouse button changed to up. 
      </p></desc>
  </func>
  
  <func>
    <name name="metaDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the Meta key was down at the time of the event. </fsummary>
    <desc><p>Returns true if the Meta key was down at the time of the event. 
      </p></desc>
  </func>
  
  <func>
    <name name="middleDClick" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the event was a middle double click. </fsummary>
    <desc><p>Returns true if the event was a middle double click. 
      </p></desc>
  </func>
  
  <func>
    <name name="middleDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the middle mouse button changed to down. </fsummary>
    <desc><p>Returns true if the middle mouse button changed to down. 
      </p></desc>
  </func>
  
  <func>
    <name name="middleIsDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the middle mouse button is currently down. </fsummary>
    <desc><p>Returns true if the middle mouse button is currently down. 
      </p></desc>
  </func>
  
  <func>
    <name name="middleUp" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the middle mouse button changed to up. </fsummary>
    <desc><p>Returns true if the middle mouse button changed to up. 
      </p></desc>
  </func>
  
  <func>
    <name name="moving" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if this was a motion event and no mouse buttons were pressed. </fsummary>
    <desc><p>Returns true if this was a motion event and no mouse buttons were pressed. 
      </p><p>If any mouse button is held pressed, then this method returns false and <seemfa marker="#dragging/1"><c>dragging/1</c></seemfa> returns true. 
      </p></desc>
  </func>
  
  <func>
    <name name="rightDClick" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the event was a right double click. </fsummary>
    <desc><p>Returns true if the event was a right double click. 
      </p></desc>
  </func>
  
  <func>
    <name name="rightDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the right mouse button changed to down. </fsummary>
    <desc><p>Returns true if the right mouse button changed to down. 
      </p></desc>
  </func>
  
  <func>
    <name name="rightIsDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the right mouse button is currently down. </fsummary>
    <desc><p>Returns true if the right mouse button is currently down. 
      </p></desc>
  </func>
  
  <func>
    <name name="rightUp" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the right mouse button changed to up. </fsummary>
    <desc><p>Returns true if the right mouse button changed to up. 
      </p></desc>
  </func>
  
  <func>
    <name name="shiftDown" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the Shift key is pressed. </fsummary>
    <desc><p>Returns true if the Shift key is pressed. 
      </p><p>This function doesn't distinguish between right and left shift keys.
      </p><p>Notice that <seemfa marker="wxKeyEvent#getModifiers/1"><c>wxKeyEvent:getModifiers/1</c></seemfa> should usually be used instead of this one. 
      </p></desc>
  </func>
  
  <func>
    <name name="getWheelAxis" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the axis the wheel operation concerns. </fsummary>
    <desc><p>Gets the axis the wheel operation concerns. 
      </p><p>Usually the mouse wheel is used to scroll vertically so <c>wxMOUSE_WHEEL_VERTICAL</c> is returned but some mice (and most trackpads) also allow to use the wheel to scroll horizontally in which case <c>wxMOUSE_WHEEL_HORIZONTAL</c> is returned.
      </p><p>Notice that before wxWidgets 2.9.4 this method returned <c>int</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="aux1DClick" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the event was a first extra button double click. </fsummary>
    <desc><p>Returns true if the event was a first extra button double click. 
      </p></desc>
  </func>
  
  <func>
    <name name="aux1Down" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the first extra button mouse button changed to down. </fsummary>
    <desc><p>Returns true if the first extra button mouse button changed to down. 
      </p></desc>
  </func>
  
  <func>
    <name name="aux1Up" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the first extra button mouse button changed to up. </fsummary>
    <desc><p>Returns true if the first extra button mouse button changed to up. 
      </p></desc>
  </func>
  
  <func>
    <name name="aux2DClick" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the event was a second extra button double click. </fsummary>
    <desc><p>Returns true if the event was a second extra button double click. 
      </p></desc>
  </func>
  
  <func>
    <name name="aux2Down" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the second extra button mouse button changed to down. </fsummary>
    <desc><p>Returns true if the second extra button mouse button changed to down. 
      </p></desc>
  </func>
  
  <func>
    <name name="aux2Up" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the second extra button mouse button changed to up. </fsummary>
    <desc><p>Returns true if the second extra button mouse button changed to up. 
      </p></desc>
  </func>
  </funcs>
</erlref>
