summaryrefslogtreecommitdiff
path: root/lib/wx/doc/src/wxHtmlWindow.xml
blob: ce8fb9b0981aebd89547bfa3e7a4dec3a47e57a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<?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>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>