<?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>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxFocusEvent</title>
</header>
<module>wxFocusEvent</module>
<modulesummary>Functions for wxFocusEvent class</modulesummary>
<description><p>A focus event is sent when a window's focus changes. The window losing focus receives a "kill focus" event while the window gaining it gets a "set focus" one.
      </p><p>Notice that the set focus event happens both when the user gives focus to the window (whether using the mouse or keyboard) and when it is done from the program itself using <seemfa marker="wxWindow#setFocus/1"><c>wxWindow:setFocus/1</c></seemfa>.
      </p><p>The focus event handlers should almost invariably call <seemfa marker="wxEvent#skip/2"><c>wxEvent:skip/2</c></seemfa> on their event argument to allow the default handling to take place. Failure to do this may result in incorrect behaviour of the native controls. Also note that wxEVT_KILL_FOCUS handler must not call <seemfa marker="wxWindow#setFocus/1"><c>wxWindow:setFocus/1</c></seemfa> as this, again, is not supported by all native controls. If you need to do this, consider using the <c>Delayed Action Mechanism</c> (not implemented in wx) described in <seeerl marker="wxIdleEvent"><c>wxIdleEvent</c></seeerl> documentation.
      </p><p>See: <url href="https://docs.wxwidgets.org/3.1/overview_events.html#overview_events">Overview events</url>
      </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_focus_event.html">wxFocusEvent</url></p>
  </description><section><title>Events</title><p>Use <seemfa marker="wxEvtHandler#connect/3"><c>wxEvtHandler:connect/3</c></seemfa> with <seetype marker="#wxFocusEventType"><c>wxFocusEventType</c></seetype> to subscribe to events of this type.</p></section>
<datatypes>
    <datatype><name name="wxFocusEvent"/></datatype>
    <datatype><name name="wxFocus"/></datatype>
    <datatype><name name="wxFocusEventType"/></datatype></datatypes>

<funcs>
  <func>
    <name name="getWindow" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the window associated with this event, that is the window which had the focus before for the <c>wxEVT_SET_FOCUS</c> event and the window which is going to receive focus for the <c>wxEVT_KILL_FOCUS</c> one. </fsummary>
    <desc><p>Returns the window associated with this event, that is the window which had the focus before for the <c>wxEVT_SET_FOCUS</c> event and the window which is going to receive focus for the <c>wxEVT_KILL_FOCUS</c> one. 
      </p><p>Warning: the window pointer may be NULL! 
      </p></desc>
  </func>
  </funcs>
</erlref>
