<?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>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </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>
