<?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>wxArtProvider</title>
</header>
<module>wxArtProvider</module>
<modulesummary>Functions for wxArtProvider class</modulesummary>
<description><p><seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> class is used to customize the look of wxWidgets application.
      </p><p>When wxWidgets needs to display an icon or a bitmap (e.g. in the standard file dialog), it does not use a hard-coded resource but asks <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> for it instead. This way users can plug in their own <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> class and easily replace standard art with their own version.
      </p><p>All that is needed is to derive a class from <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl>, override either its <c>wxArtProvider::CreateBitmap()</c> (not implemented in wx) and/or its <c>wxArtProvider::CreateIconBundle()</c> (not implemented in wx) methods and register the provider with <c>wxArtProvider::Push()</c> (not implemented in wx):
      </p><p>If you need bitmap images (of the same artwork) that should be displayed at different sizes you should probably consider overriding <c>wxArtProvider::CreateIconBundle</c> (not implemented in wx) and supplying icon bundles that contain different bitmap sizes.
      </p><p>There's another way of taking advantage of this class: you can use it in your code and use platform native icons as provided by <seemfa marker="#getBitmap/2"><c>getBitmap/2</c></seemfa> or <seemfa marker="#getIcon/2"><c>getIcon/2</c></seemfa>.
      </p><p>Identifying art resources</p> <p>Every bitmap and icon bundle are known to <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> under an unique ID that is used when requesting a resource from it. The ID is represented by the ?wxArtID type and can have one of these predefined values (you can see bitmaps represented by these constants in the page_samples_artprov):
      </p> <p>Additionally, any string recognized by custom art providers registered using <c>wxArtProvider::Push</c> (not implemented in wx) may be used.
      </p><p>Note: When running under GTK+ 2, GTK+ stock item IDs (e.g. <c>"gtk-cdrom"</c>) may be used as well:  For a list of the GTK+ stock items please refer to the <url href="http://library.gnome.org/devel/gtk/stable/gtk-Stock-Items.html">GTK+ documentation page</url>. It is also possible to load icons from the current icon theme by specifying their name (without extension and directory components). Icon themes recognized by GTK+ follow the freedesktop.org <url href="http://freedesktop.org/Standards/icon-theme-spec">Icon Themes specification</url>. Note that themes are not guaranteed to contain all icons, so <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> may return ?wxNullBitmap or ?wxNullIcon. The default theme is typically installed in <c>/usr/share/icons/hicolor</c>.
      </p><p>Clients</p> <p>The <c>client</c> is the entity that calls <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl>'s <seemfa marker="#getBitmap/2"><c>getBitmap/2</c></seemfa> or <seemfa marker="#getIcon/2"><c>getIcon/2</c></seemfa> function. It is represented by wxClientID type and can have one of these values:
      </p> <p> Client ID serve as a hint to <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> that is supposed to help it to choose the best looking bitmap. For example it is often desirable to use slightly different icons in menus and toolbars even though they represent the same action (e.g. wxART_FILE_OPEN). Remember that this is really only a hint for <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl> - it is common that <seemfa marker="#getBitmap/2"><c>getBitmap/2</c></seemfa> returns identical bitmap for different client values!
      </p><p>See: <url href="https://docs.wxwidgets.org/3.1/page_samples.html#page_samples_artprov for an example of">Examples</url>, <seeerl marker="wxArtProvider"><c>wxArtProvider</c></seeerl>, usage; stock ID list
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_art_provider.html">wxArtProvider</url></p>
  </description>
<datatypes><datatype><name name="wxArtProvider"/></datatype></datatypes>

<funcs>
  <func>
    <name name="getBitmap" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>getBitmap/2</c></fsummary>
  </func>
  
  <func>
    <name name="getBitmap" arity="2" clause_i="1" since=""/>
    <fsummary>Query registered providers for bitmap with given ID. </fsummary>
    <desc><p>Query registered providers for bitmap with given ID. 
      </p><p>Return: The bitmap if one of registered providers recognizes the ID or wxNullBitmap otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="getIcon" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>getIcon/2</c></fsummary>
  </func>
  
  <func>
    <name name="getIcon" arity="2" clause_i="1" since=""/>
    <fsummary>Same as <c>getBitmap/2</c>, but return a <c>wxIcon</c> object (or ?wxNullIcon on failure). </fsummary>
    <desc><p>Same as <seemfa marker="#getBitmap/2"><c>getBitmap/2</c></seemfa>, but return a <seeerl marker="wxIcon"><c>wxIcon</c></seeerl> object (or ?wxNullIcon on failure). 
      </p></desc>
  </func>
  </funcs>
</erlref>
