<?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>wxIcon</title>
</header>
<module>wxIcon</module>
<modulesummary>Functions for wxIcon class</modulesummary>
<description><p>An icon is a small rectangular bitmap usually used for denoting a minimized application.
      </p><p>It differs from a <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl> in always having a mask associated with it for transparent drawing. On some platforms, icons and bitmaps are implemented identically, since there is no real distinction between a <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl> with a mask and an icon; and there is no specific icon format on some platforms (X-based applications usually standardize on XPMs for small bitmaps and icons). However, some platforms (such as Windows) make the distinction, so a separate class is provided.
      </p><p>Remark: It is usually desirable to associate a pertinent icon with a frame. Icons can also be used for other purposes, for example with <seeerl marker="wxTreeCtrl"><c>wxTreeCtrl</c></seeerl> and <seeerl marker="wxListCtrl"><c>wxListCtrl</c></seeerl>. Icons have different formats on different platforms therefore separate icons will usually be created for the different environments. Platform-specific methods for creating a <seeerl marker="wxIcon"><c>wxIcon</c></seeerl> structure are catered for, and this is an occasion where conditional compilation will probably be required. Note that a new icon must be created for every time the icon is to be used for a new window. In Windows, the icon will not be reloaded if it has already been used. An icon allocated to a frame will be deleted when the frame is deleted. For more information please see overview_bitmap.
      </p><p>Predefined objects (include wx.hrl): ?wxNullIcon
      </p><p>See: <url href="https://docs.wxwidgets.org/3.1/overview_bitmap.html#overview_bitmap">Overview bitmap</url>, <url href="https://docs.wxwidgets.org/3.1/overview_bitmap.html#overview_bitmap_supportedformats">Overview bitmap</url>, <seeerl marker="wxIconBundle"><c>wxIconBundle</c></seeerl>, <seemfa marker="wxDC#drawIcon/3"><c>wxDC:drawIcon/3</c></seemfa>, <seeerl marker="wxCursor"><c>wxCursor</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_icon.html">wxIcon</url></p>
  </description>
<datatypes><datatype><name name="wxIcon"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default ctor. </fsummary>
    <desc><p>Default ctor. 
      </p><p>Constructs an icon object with no data; an assignment or another member function such as <seemfa marker="wxBitmap#loadFile/3"><c>wxBitmap:loadFile/3</c></seemfa> must be called subsequently. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
    <fsummary>Copy ctor. </fsummary>
    <desc><p>Copy ctor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>Loads an icon from a file or resource. </fsummary>
    <desc><p>Loads an icon from a file or resource. 
      </p><p>See: <seemfa marker="wxBitmap#loadFile/3"><c>wxBitmap:loadFile/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="copyFromBitmap" arity="2" clause_i="1" since=""/>
    <fsummary>Copies <c>bmp</c> bitmap to this icon. </fsummary>
    <desc><p>Copies <c>bmp</c> bitmap to this icon. 
      </p><p>Under MS Windows the bitmap must have mask colour set.
      </p><p>See: <seemfa marker="wxBitmap#loadFile/3"><c>wxBitmap:loadFile/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>See overview_refcount_destruct for more info.
      </p><p>If the application omits to delete the icon explicitly, the icon will be destroyed automatically by wxWidgets when the application exits.
      </p><p>Warning: Do not delete an icon that is selected into a memory device context. 
      </p></desc>
  </func>
  </funcs>
</erlref>
