1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2008-2020. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%% This file is generated DO NOT EDIT
20
21-module(wxHtmlEasyPrinting).
22-include("wxe.hrl").
23-export([destroy/1,getPageSetupData/1,getPrintData/1,new/0,new/1,pageSetup/1,
24  previewFile/2,previewText/2,previewText/3,printFile/2,printText/2,
25  printText/3,setFonts/3,setFonts/4,setFooter/2,setFooter/3,setHeader/2,
26  setHeader/3]).
27
28%% inherited exports
29-export([parent_class/1]).
30
31-type wxHtmlEasyPrinting() :: wx:wx_object().
32-export_type([wxHtmlEasyPrinting/0]).
33%% @hidden
34parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
35
36%% @equiv new([])
37-spec new() -> wxHtmlEasyPrinting().
38
39new() ->
40  new([]).
41
42%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingwxhtmleasyprinting">external documentation</a>.
43-spec new([Option]) -> wxHtmlEasyPrinting() when
44	Option :: {'name', unicode:chardata()}
45		 | {'parentWindow', wxWindow:wxWindow()}.
46new(Options)
47 when is_list(Options) ->
48  MOpts = fun({name, Name}) ->   Name_UC = unicode:characters_to_binary(Name),{name,Name_UC};
49          ({parentWindow, #wx_ref{type=ParentWindowT}} = Arg) ->   ?CLASS(ParentWindowT,wxWindow),Arg;
50          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
51  Opts = lists:map(MOpts, Options),
52  wxe_util:queue_cmd(Opts,?get_env(),?wxHtmlEasyPrinting_new),
53  wxe_util:rec(?wxHtmlEasyPrinting_new).
54
55%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintinggetprintdata">external documentation</a>.
56-spec getPrintData(This) -> wxPrintData:wxPrintData() when
57	This::wxHtmlEasyPrinting().
58getPrintData(#wx_ref{type=ThisT}=This) ->
59  ?CLASS(ThisT,wxHtmlEasyPrinting),
60  wxe_util:queue_cmd(This,?get_env(),?wxHtmlEasyPrinting_GetPrintData),
61  wxe_util:rec(?wxHtmlEasyPrinting_GetPrintData).
62
63%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintinggetpagesetupdata">external documentation</a>.
64-spec getPageSetupData(This) -> wxPageSetupDialogData:wxPageSetupDialogData() when
65	This::wxHtmlEasyPrinting().
66getPageSetupData(#wx_ref{type=ThisT}=This) ->
67  ?CLASS(ThisT,wxHtmlEasyPrinting),
68  wxe_util:queue_cmd(This,?get_env(),?wxHtmlEasyPrinting_GetPageSetupData),
69  wxe_util:rec(?wxHtmlEasyPrinting_GetPageSetupData).
70
71%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpreviewfile">external documentation</a>.
72-spec previewFile(This, Htmlfile) -> boolean() when
73	This::wxHtmlEasyPrinting(), Htmlfile::unicode:chardata().
74previewFile(#wx_ref{type=ThisT}=This,Htmlfile)
75 when ?is_chardata(Htmlfile) ->
76  ?CLASS(ThisT,wxHtmlEasyPrinting),
77  Htmlfile_UC = unicode:characters_to_binary(Htmlfile),
78  wxe_util:queue_cmd(This,Htmlfile_UC,?get_env(),?wxHtmlEasyPrinting_PreviewFile),
79  wxe_util:rec(?wxHtmlEasyPrinting_PreviewFile).
80
81%% @equiv previewText(This,Htmltext, [])
82-spec previewText(This, Htmltext) -> boolean() when
83	This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata().
84
85previewText(This,Htmltext)
86 when is_record(This, wx_ref),?is_chardata(Htmltext) ->
87  previewText(This,Htmltext, []).
88
89%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpreviewtext">external documentation</a>.
90-spec previewText(This, Htmltext, [Option]) -> boolean() when
91	This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata(),
92	Option :: {'basepath', unicode:chardata()}.
93previewText(#wx_ref{type=ThisT}=This,Htmltext, Options)
94 when ?is_chardata(Htmltext),is_list(Options) ->
95  ?CLASS(ThisT,wxHtmlEasyPrinting),
96  Htmltext_UC = unicode:characters_to_binary(Htmltext),
97  MOpts = fun({basepath, Basepath}) ->   Basepath_UC = unicode:characters_to_binary(Basepath),{basepath,Basepath_UC};
98          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
99  Opts = lists:map(MOpts, Options),
100  wxe_util:queue_cmd(This,Htmltext_UC, Opts,?get_env(),?wxHtmlEasyPrinting_PreviewText),
101  wxe_util:rec(?wxHtmlEasyPrinting_PreviewText).
102
103%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingprintfile">external documentation</a>.
104-spec printFile(This, Htmlfile) -> boolean() when
105	This::wxHtmlEasyPrinting(), Htmlfile::unicode:chardata().
106printFile(#wx_ref{type=ThisT}=This,Htmlfile)
107 when ?is_chardata(Htmlfile) ->
108  ?CLASS(ThisT,wxHtmlEasyPrinting),
109  Htmlfile_UC = unicode:characters_to_binary(Htmlfile),
110  wxe_util:queue_cmd(This,Htmlfile_UC,?get_env(),?wxHtmlEasyPrinting_PrintFile),
111  wxe_util:rec(?wxHtmlEasyPrinting_PrintFile).
112
113%% @equiv printText(This,Htmltext, [])
114-spec printText(This, Htmltext) -> boolean() when
115	This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata().
116
117printText(This,Htmltext)
118 when is_record(This, wx_ref),?is_chardata(Htmltext) ->
119  printText(This,Htmltext, []).
120
121%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingprinttext">external documentation</a>.
122-spec printText(This, Htmltext, [Option]) -> boolean() when
123	This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata(),
124	Option :: {'basepath', unicode:chardata()}.
125printText(#wx_ref{type=ThisT}=This,Htmltext, Options)
126 when ?is_chardata(Htmltext),is_list(Options) ->
127  ?CLASS(ThisT,wxHtmlEasyPrinting),
128  Htmltext_UC = unicode:characters_to_binary(Htmltext),
129  MOpts = fun({basepath, Basepath}) ->   Basepath_UC = unicode:characters_to_binary(Basepath),{basepath,Basepath_UC};
130          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
131  Opts = lists:map(MOpts, Options),
132  wxe_util:queue_cmd(This,Htmltext_UC, Opts,?get_env(),?wxHtmlEasyPrinting_PrintText),
133  wxe_util:rec(?wxHtmlEasyPrinting_PrintText).
134
135%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpagesetup">external documentation</a>.
136-spec pageSetup(This) -> 'ok' when
137	This::wxHtmlEasyPrinting().
138pageSetup(#wx_ref{type=ThisT}=This) ->
139  ?CLASS(ThisT,wxHtmlEasyPrinting),
140  wxe_util:queue_cmd(This,?get_env(),?wxHtmlEasyPrinting_PageSetup).
141
142%% @equiv setFonts(This,Normal_face,Fixed_face, [])
143-spec setFonts(This, Normal_face, Fixed_face) -> 'ok' when
144	This::wxHtmlEasyPrinting(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata().
145
146setFonts(This,Normal_face,Fixed_face)
147 when is_record(This, wx_ref),?is_chardata(Normal_face),?is_chardata(Fixed_face) ->
148  setFonts(This,Normal_face,Fixed_face, []).
149
150%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetfonts">external documentation</a>.
151-spec setFonts(This, Normal_face, Fixed_face, [Option]) -> 'ok' when
152	This::wxHtmlEasyPrinting(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata(),
153	Option :: {'sizes', [integer()]}.
154setFonts(#wx_ref{type=ThisT}=This,Normal_face,Fixed_face, Options)
155 when ?is_chardata(Normal_face),?is_chardata(Fixed_face),is_list(Options) ->
156  ?CLASS(ThisT,wxHtmlEasyPrinting),
157  Normal_face_UC = unicode:characters_to_binary(Normal_face),
158  Fixed_face_UC = unicode:characters_to_binary(Fixed_face),
159  MOpts = fun({sizes, _sizes} = Arg) -> Arg;
160          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
161  Opts = lists:map(MOpts, Options),
162  wxe_util:queue_cmd(This,Normal_face_UC,Fixed_face_UC, Opts,?get_env(),?wxHtmlEasyPrinting_SetFonts).
163
164%% @equiv setHeader(This,Header, [])
165-spec setHeader(This, Header) -> 'ok' when
166	This::wxHtmlEasyPrinting(), Header::unicode:chardata().
167
168setHeader(This,Header)
169 when is_record(This, wx_ref),?is_chardata(Header) ->
170  setHeader(This,Header, []).
171
172%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetheader">external documentation</a>.
173-spec setHeader(This, Header, [Option]) -> 'ok' when
174	This::wxHtmlEasyPrinting(), Header::unicode:chardata(),
175	Option :: {'pg', integer()}.
176setHeader(#wx_ref{type=ThisT}=This,Header, Options)
177 when ?is_chardata(Header),is_list(Options) ->
178  ?CLASS(ThisT,wxHtmlEasyPrinting),
179  Header_UC = unicode:characters_to_binary(Header),
180  MOpts = fun({pg, _pg} = Arg) -> Arg;
181          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
182  Opts = lists:map(MOpts, Options),
183  wxe_util:queue_cmd(This,Header_UC, Opts,?get_env(),?wxHtmlEasyPrinting_SetHeader).
184
185%% @equiv setFooter(This,Footer, [])
186-spec setFooter(This, Footer) -> 'ok' when
187	This::wxHtmlEasyPrinting(), Footer::unicode:chardata().
188
189setFooter(This,Footer)
190 when is_record(This, wx_ref),?is_chardata(Footer) ->
191  setFooter(This,Footer, []).
192
193%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetfooter">external documentation</a>.
194-spec setFooter(This, Footer, [Option]) -> 'ok' when
195	This::wxHtmlEasyPrinting(), Footer::unicode:chardata(),
196	Option :: {'pg', integer()}.
197setFooter(#wx_ref{type=ThisT}=This,Footer, Options)
198 when ?is_chardata(Footer),is_list(Options) ->
199  ?CLASS(ThisT,wxHtmlEasyPrinting),
200  Footer_UC = unicode:characters_to_binary(Footer),
201  MOpts = fun({pg, _pg} = Arg) -> Arg;
202          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
203  Opts = lists:map(MOpts, Options),
204  wxe_util:queue_cmd(This,Footer_UC, Opts,?get_env(),?wxHtmlEasyPrinting_SetFooter).
205
206%% @doc Destroys this object, do not use object again
207-spec destroy(This::wxHtmlEasyPrinting()) -> 'ok'.
208destroy(Obj=#wx_ref{type=Type}) ->
209  ?CLASS(Type,wxHtmlEasyPrinting),
210  wxe_util:queue_cmd(Obj, ?get_env(), ?DESTROY_OBJECT),
211  ok.
212