<?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>wxPaintEvent</title>
</header>
<module>wxPaintEvent</module>
<modulesummary>Functions for wxPaintEvent class</modulesummary>
<description><p>A paint event is sent when a window's contents needs to be repainted.
      </p><p>The handler of this event must create a <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl> object and use it for painting the window contents. For example: 
      </p><p>Notice that you must <c>not</c> create other kinds of <seeerl marker="wxDC"><c>wxDC</c></seeerl> (e.g. <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> or <seeerl marker="wxWindowDC"><c>wxWindowDC</c></seeerl>) in EVT_PAINT handlers and also don't create <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl> outside of this event handlers.
      </p><p>You can optimize painting by retrieving the rectangles that have been damaged and only repainting these. The rectangles are in terms of the client area, and are unscrolled, so you will need to do some calculations using the current view position to obtain logical, scrolled units. Here is an example of using the <c>wxRegionIterator</c> (not implemented in wx) class: 
      </p><p>Remark: Please notice that in general it is impossible to change the drawing of a standard control (such as <seeerl marker="wxButton"><c>wxButton</c></seeerl>) and so you shouldn't attempt to handle paint events for them as even if it might work on some platforms, this is inherently not portable and won't work everywhere.
      </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_paint_event.html">wxPaintEvent</url></p>
  </description><section><title>Events</title><p>Use <seemfa marker="wxEvtHandler#connect/3"><c>wxEvtHandler:connect/3</c></seemfa> with <seetype marker="#wxPaintEventType"><c>wxPaintEventType</c></seetype> to subscribe to events of this type.</p></section>
<datatypes>
    <datatype><name name="wxPaintEvent"/></datatype>
    <datatype><name name="wxPaint"/></datatype>
    <datatype><name name="wxPaintEventType"/></datatype></datatypes>

</erlref>
