<?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>wxHtmlWindow</title>
</header>
<module>wxHtmlWindow</module>
<modulesummary>Functions for wxHtmlWindow class</modulesummary>
<description><p><seeerl marker="wxHtmlWindow"><c>wxHtmlWindow</c></seeerl> is probably the only class you will directly use unless you want to do something special (like adding new tag handlers or MIME filters).
      </p><p>The purpose of this class is to display rich content pages (either local file or downloaded via HTTP protocol) in a window based on a subset of the HTML standard. The width of the window is constant, given in the constructor and virtual height is changed dynamically depending on page size. Once the window is created you can set its content by calling <seemfa marker="#setPage/2"><c>setPage/2</c></seemfa> with raw HTML, <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa> with a <c>wxFileSystem</c> (not implemented in wx) location or <seemfa marker="#loadFile/2"><c>loadFile/2</c></seemfa> with a filename.
      </p><p>Note: If you want complete HTML/CSS support as well as a Javascript engine, consider using <seeerl marker="wxWebView"><c>wxWebView</c></seeerl> instead.
      </p><p><seeerl marker="wxHtmlWindow"><c>wxHtmlWindow</c></seeerl> uses the <seeerl marker="wxImage"><c>wxImage</c></seeerl> class for displaying images, so you need to initialize the handlers for any image formats you use before loading a page. See ?wxInitAllImageHandlers and <c>wxImage::AddHandler</c> (not implemented in wx).
      </p><p>Styles</p><p>This class supports the following styles:
      </p><p>See: <seeerl marker="wxHtmlLinkEvent"><c>wxHtmlLinkEvent</c></seeerl>, <c>wxHtmlCellEvent</c> (not implemented in wx)
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxScrolledWindow"><c>wxScrolledWindow</c></seeerl> <seeerl marker="wxPanel"><c>wxPanel</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_html_window.html">wxHtmlWindow</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxHtmlLinkEvent"><c>html_cell_clicked</c></seeerl>, <seeerl marker="wxHtmlLinkEvent"><c>html_cell_hover</c></seeerl>, <seeerl marker="wxHtmlLinkEvent"><c>command_html_link_clicked</c></seeerl></p></section>
<datatypes><datatype><name name="wxHtmlWindow"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default ctor. </fsummary>
    <desc><p>Default ctor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>new/2</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>Constructor. </fsummary>
    <desc><p>Constructor. 
      </p><p>The parameters are the same as <c>wxScrolled::wxScrolled()</c> (not implemented in wx) constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="appendToPage" arity="2" clause_i="1" since=""/>
    <fsummary>Appends HTML fragment to currently displayed text and refreshes the window. </fsummary>
    <desc><p>Appends HTML fragment to currently displayed text and refreshes the window. 
      </p><p>Return: false if an error occurred, true otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="getOpenedAnchor" arity="1" clause_i="1" since=""/>
    <fsummary>Returns anchor within currently opened page (see <c>getOpenedPage/1</c>). </fsummary>
    <desc><p>Returns anchor within currently opened page (see <seemfa marker="#getOpenedPage/1"><c>getOpenedPage/1</c></seemfa>). 
      </p><p>If no page is opened or if the displayed page wasn't produced by call to <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa>, empty string is returned. 
      </p></desc>
  </func>
  
  <func>
    <name name="getOpenedPage" arity="1" clause_i="1" since=""/>
    <fsummary>Returns full location of the opened page. </fsummary>
    <desc><p>Returns full location of the opened page. 
      </p><p>If no page is opened or if the displayed page wasn't produced by call to <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa>, empty string is returned. 
      </p></desc>
  </func>
  
  <func>
    <name name="getOpenedPageTitle" arity="1" clause_i="1" since=""/>
    <fsummary>Returns title of the opened page or wxEmptyString if the current page does not contain &lt;TITLE&gt; tag. </fsummary>
    <desc><p>Returns title of the opened page or wxEmptyString if the current page does not contain &lt;TITLE&gt; tag. 
      </p></desc>
  </func>
  
  <func>
    <name name="getRelatedFrame" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the related frame. </fsummary>
    <desc><p>Returns the related frame. 
      </p></desc>
  </func>
  
  <func>
    <name name="historyBack" arity="1" clause_i="1" since=""/>
    <fsummary>Moves back to the previous page. </fsummary>
    <desc><p>Moves back to the previous page. 
      </p><p>Only pages displayed using <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa> are stored in history list. 
      </p></desc>
  </func>
  
  <func>
    <name name="historyCanBack" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if it is possible to go back in the history i.e. </fsummary>
    <desc><p>Returns true if it is possible to go back in the history i.e. 
      </p><p><seemfa marker="#historyBack/1"><c>historyBack/1</c></seemfa> won't fail. 
      </p></desc>
  </func>
  
  <func>
    <name name="historyCanForward" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if it is possible to go forward in the history i.e. </fsummary>
    <desc><p>Returns true if it is possible to go forward in the history i.e. 
      </p><p><seemfa marker="#historyForward/1"><c>historyForward/1</c></seemfa> won't fail. 
      </p></desc>
  </func>
  
  <func>
    <name name="historyClear" arity="1" clause_i="1" since=""/>
    <fsummary>Clears history. </fsummary>
    <desc><p>Clears history. 
      </p></desc>
  </func>
  
  <func>
    <name name="historyForward" arity="1" clause_i="1" since=""/>
    <fsummary>Moves to next page in history. </fsummary>
    <desc><p>Moves to next page in history. 
      </p><p>Only pages displayed using <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa> are stored in history list. 
      </p></desc>
  </func>
  
  <func>
    <name name="loadFile" arity="2" clause_i="1" since=""/>
    <fsummary>Loads an HTML page from a file and displays it. </fsummary>
    <desc><p>Loads an HTML page from a file and displays it. 
      </p><p>Return: false if an error occurred, true otherwise
      </p><p>See: <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="loadPage" arity="2" clause_i="1" since=""/>
    <fsummary>Unlike <c>setPage/2</c> this function first loads the HTML page from <c>location</c> and then displays it. </fsummary>
    <desc><p>Unlike <seemfa marker="#setPage/2"><c>setPage/2</c></seemfa> this function first loads the HTML page from <c>location</c> and then displays it. 
      </p><p>Return: false if an error occurred, true otherwise
      </p><p>See: <seemfa marker="#loadFile/2"><c>loadFile/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="selectAll" arity="1" clause_i="1" since=""/>
    <fsummary>Selects all text in the window. </fsummary>
    <desc><p>Selects all text in the window. 
      </p><p>See: <seemfa marker="#selectLine/2"><c>selectLine/2</c></seemfa>, <seemfa marker="#selectWord/2"><c>selectWord/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="selectionToText" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the current selection as plain text. </fsummary>
    <desc><p>Returns the current selection as plain text. 
      </p><p>Returns an empty string if no text is currently selected. 
      </p></desc>
  </func>
  
  <func>
    <name name="selectLine" arity="2" clause_i="1" since=""/>
    <fsummary>Selects the line of text that <c>pos</c> points at. </fsummary>
    <desc><p>Selects the line of text that <c>pos</c> points at. 
      </p><p>Note that <c>pos</c> is relative to the top of displayed page, not to window's origin, use <seemfa marker="wxScrolledWindow#calcUnscrolledPosition/3"><c>wxScrolledWindow:calcUnscrolledPosition/3</c></seemfa> to convert physical coordinate.
      </p><p>See: <seemfa marker="#selectAll/1"><c>selectAll/1</c></seemfa>, <seemfa marker="#selectWord/2"><c>selectWord/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="selectWord" arity="2" clause_i="1" since=""/>
    <fsummary>Selects the word at position <c>pos</c>. </fsummary>
    <desc><p>Selects the word at position <c>pos</c>. 
      </p><p>Note that <c>pos</c> is relative to the top of displayed page, not to window's origin, use <seemfa marker="wxScrolledWindow#calcUnscrolledPosition/3"><c>wxScrolledWindow:calcUnscrolledPosition/3</c></seemfa> to convert physical coordinate.
      </p><p>See: <seemfa marker="#selectAll/1"><c>selectAll/1</c></seemfa>, <seemfa marker="#selectLine/2"><c>selectLine/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setBorders" arity="2" clause_i="1" since=""/>
    <fsummary>This function sets the space between border of window and HTML contents. </fsummary>
    <desc><p>This function sets the space between border of window and HTML contents. 
      </p><p>See image: 
      </p></desc>
  </func>
  
  <func>
    <name name="setFonts" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>setFonts/4</c></fsummary>
  </func>
  
  <func>
    <name name="setFonts" arity="4" clause_i="1" since=""/>
    <fsummary>This function sets font sizes and faces. </fsummary>
    <desc><p>This function sets font sizes and faces. 
      </p><p>See <c>wxHtmlDCRenderer::SetFonts</c> (not implemented in wx) for detailed description.
      </p><p>See: SetSize()
      </p></desc>
  </func>
  
  <func>
    <name name="setPage" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the source of a page and displays it, for example: </fsummary>
    <desc><p>Sets the source of a page and displays it, for example: 
      </p><p>If you want to load a document from some location use <seemfa marker="#loadPage/2"><c>loadPage/2</c></seemfa> instead.
      </p><p>Return: false if an error occurred, true otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="setRelatedFrame" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the frame in which page title will be displayed. </fsummary>
    <desc><p>Sets the frame in which page title will be displayed. 
      </p><p><c>format</c> is the format of the frame title, e.g. "HtmlHelp : %s". It must contain exactly one s. This s is substituted with HTML page title. 
      </p></desc>
  </func>
  
  <func>
    <name name="setRelatedStatusBar" arity="2" clause_i="1" since=""/>
  
    <name name="setRelatedStatusBar" arity="2" clause_i="2" since=""/>
    <fsummary><c>After</c> calling <c>setRelatedFrame/3</c>, this sets statusbar slot where messages will be displayed. </fsummary>
    <desc><p><c>After</c> calling <seemfa marker="#setRelatedFrame/3"><c>setRelatedFrame/3</c></seemfa>, this sets statusbar slot where messages will be displayed. 
      </p><p>(Default is -1 = no messages.)
      </p></desc>
  </func>
  
  <func>
    <name name="setRelatedStatusBar" arity="3" clause_i="1" since=""/>
    <fsummary><c>Sets</c> the associated statusbar where messages will be displayed. </fsummary>
    <desc><p><c>Sets</c> the associated statusbar where messages will be displayed. 
      </p><p>Call this instead of <seemfa marker="#setRelatedFrame/3"><c>setRelatedFrame/3</c></seemfa> if you want statusbar updates only, no changing of the frame title.
      </p><p>Since: 2.9.0 
      </p></desc>
  </func>
  
  <func>
    <name name="toText" arity="1" clause_i="1" since=""/>
    <fsummary>Returns content of currently displayed page as plain text. </fsummary>
    <desc><p>Returns content of currently displayed page as plain text. 
      </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>
