<?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>wxClientDC</title>
</header>
<module>wxClientDC</module>
<modulesummary>Functions for wxClientDC class</modulesummary>
<description><p><seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> is primarily useful for obtaining information about the window from outside EVT_PAINT() handler.
      </p><p>Typical use of this class is to obtain the extent of some text string in order to allocate enough size for a window, e.g. 
      </p><p>Note: While <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> may also be used for drawing on the client area of a window from outside an EVT_PAINT() handler in some ports, this does <c>not</c> work on all platforms (neither wxOSX nor wxGTK with GTK 3 Wayland backend support this, so drawing using <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> simply doesn't have any effect there) and the only portable way of drawing is via <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl>. To redraw a small part of the window, use <seemfa marker="wxWindow#refreshRect/3"><c>wxWindow:refreshRect/3</c></seemfa> to invalidate just this part and check <seemfa marker="wxWindow#getUpdateRegion/1"><c>wxWindow:getUpdateRegion/1</c></seemfa> in the paint event handler to redraw this part only.
      </p><p><seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> objects should normally be constructed as temporary stack objects, i.e. don't store a <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> object.
      </p><p>A <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> object is initialized to use the same font and colours as the window it is associated with.
      </p><p>See: <seeerl marker="wxDC"><c>wxDC</c></seeerl>, <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>, <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl>, <seeerl marker="wxWindowDC"><c>wxWindowDC</c></seeerl>, <seeerl marker="wxScreenDC"><c>wxScreenDC</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxWindowDC"><c>wxWindowDC</c></seeerl> <seeerl marker="wxDC"><c>wxDC</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_client_d_c.html">wxClientDC</url></p>
  </description>
<datatypes><datatype><name name="wxClientDC"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
    <fsummary>Constructor. </fsummary>
    <desc><p>Constructor. 
      </p><p>Pass a pointer to the window on which you wish to paint. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor</fsummary>
    <desc><p>Destroys the object.</p></desc>
  </func>
  </funcs>
</erlref>
