%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% 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. %% %% %CopyrightEnd% %% This file is generated DO NOT EDIT %% @doc See external documentation: wxPrintPreview. %% @type wxPrintPreview(). An object reference, The representation is internal %% and can be changed without notice. It can't be used for comparsion %% stored on disc or distributed for use on other nodes. -module(wxPrintPreview). -include("wxe.hrl"). -export([destroy/1,getCanvas/1,getCurrentPage/1,getFrame/1,getMaxPage/1,getMinPage/1, getPrintout/1,getPrintoutForPrinting/1,isOk/1,new/1,new/2,new/3,paintPage/3, print/2,renderPage/2,setCanvas/2,setCurrentPage/2,setFrame/2,setPrintout/2, setZoom/2]). %% inherited exports -export([parent_class/1]). -export_type([wxPrintPreview/0]). %% @hidden parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -type wxPrintPreview() :: wx:wx_object(). %% @equiv new(Printout, []) -spec new(Printout) -> wxPrintPreview() when Printout::wxPrintout:wxPrintout(). new(Printout) when is_record(Printout, wx_ref) -> new(Printout, []). %% @doc See external documentation. -spec new(Printout, [Option]) -> wxPrintPreview() when Printout::wxPrintout:wxPrintout(), Option :: {'printoutForPrinting', wxPrintout:wxPrintout()} | {'data', wxPrintDialogData:wxPrintDialogData()}. new(#wx_ref{type=PrintoutT,ref=PrintoutRef}, Options) when is_list(Options) -> ?CLASS(PrintoutT,wxPrintout), MOpts = fun({printoutForPrinting, #wx_ref{type=PrintoutForPrintingT,ref=PrintoutForPrintingRef}}, Acc) -> ?CLASS(PrintoutForPrintingT,wxPrintout),[<<1:32/?UI,PrintoutForPrintingRef:32/?UI>>|Acc]; ({data, #wx_ref{type=DataT,ref=DataRef}}, Acc) -> ?CLASS(DataT,wxPrintDialogData),[<<2:32/?UI,DataRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:construct(?wxPrintPreview_new_2, <>). %% @doc See external documentation. -spec new(Printout, PrintoutForPrinting, Data) -> wxPrintPreview() when Printout::wxPrintout:wxPrintout(), PrintoutForPrinting::wxPrintout:wxPrintout(), Data::wxPrintData:wxPrintData(). new(#wx_ref{type=PrintoutT,ref=PrintoutRef},#wx_ref{type=PrintoutForPrintingT,ref=PrintoutForPrintingRef},#wx_ref{type=DataT,ref=DataRef}) -> ?CLASS(PrintoutT,wxPrintout), ?CLASS(PrintoutForPrintingT,wxPrintout), ?CLASS(DataT,wxPrintData), wxe_util:construct(?wxPrintPreview_new_3, <>). %% @doc See external documentation. -spec getCanvas(This) -> wxPreviewCanvas:wxPreviewCanvas() when This::wxPrintPreview(). getCanvas(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetCanvas, <>). %% @doc See external documentation. -spec getCurrentPage(This) -> integer() when This::wxPrintPreview(). getCurrentPage(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetCurrentPage, <>). %% @doc See external documentation. -spec getFrame(This) -> wxFrame:wxFrame() when This::wxPrintPreview(). getFrame(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetFrame, <>). %% @doc See external documentation. -spec getMaxPage(This) -> integer() when This::wxPrintPreview(). getMaxPage(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetMaxPage, <>). %% @doc See external documentation. -spec getMinPage(This) -> integer() when This::wxPrintPreview(). getMinPage(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetMinPage, <>). %% @doc See external documentation. -spec getPrintout(This) -> wxPrintout:wxPrintout() when This::wxPrintPreview(). getPrintout(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetPrintout, <>). %% @doc See external documentation. -spec getPrintoutForPrinting(This) -> wxPrintout:wxPrintout() when This::wxPrintPreview(). getPrintoutForPrinting(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_GetPrintoutForPrinting, <>). %% @doc See external documentation. -spec isOk(This) -> boolean() when This::wxPrintPreview(). isOk(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_IsOk, <>). %% @doc See external documentation. -spec paintPage(This, Canvas, Dc) -> boolean() when This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas(), Dc::wxDC:wxDC(). paintPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CanvasT,ref=CanvasRef},#wx_ref{type=DcT,ref=DcRef}) -> ?CLASS(ThisT,wxPrintPreview), ?CLASS(CanvasT,wxPreviewCanvas), ?CLASS(DcT,wxDC), wxe_util:call(?wxPrintPreview_PaintPage, <>). %% @doc See external documentation. -spec print(This, Interactive) -> boolean() when This::wxPrintPreview(), Interactive::boolean(). print(#wx_ref{type=ThisT,ref=ThisRef},Interactive) when is_boolean(Interactive) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_Print, <>). %% @doc See external documentation. -spec renderPage(This, PageNum) -> boolean() when This::wxPrintPreview(), PageNum::integer(). renderPage(#wx_ref{type=ThisT,ref=ThisRef},PageNum) when is_integer(PageNum) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_RenderPage, <>). %% @doc See external documentation. -spec setCanvas(This, Canvas) -> 'ok' when This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas(). setCanvas(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CanvasT,ref=CanvasRef}) -> ?CLASS(ThisT,wxPrintPreview), ?CLASS(CanvasT,wxPreviewCanvas), wxe_util:cast(?wxPrintPreview_SetCanvas, <>). %% @doc See external documentation. -spec setCurrentPage(This, PageNum) -> boolean() when This::wxPrintPreview(), PageNum::integer(). setCurrentPage(#wx_ref{type=ThisT,ref=ThisRef},PageNum) when is_integer(PageNum) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:call(?wxPrintPreview_SetCurrentPage, <>). %% @doc See external documentation. -spec setFrame(This, Frame) -> 'ok' when This::wxPrintPreview(), Frame::wxFrame:wxFrame(). setFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}) -> ?CLASS(ThisT,wxPrintPreview), ?CLASS(FrameT,wxFrame), wxe_util:cast(?wxPrintPreview_SetFrame, <>). %% @doc See external documentation. -spec setPrintout(This, Printout) -> 'ok' when This::wxPrintPreview(), Printout::wxPrintout:wxPrintout(). setPrintout(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintoutT,ref=PrintoutRef}) -> ?CLASS(ThisT,wxPrintPreview), ?CLASS(PrintoutT,wxPrintout), wxe_util:cast(?wxPrintPreview_SetPrintout, <>). %% @doc See external documentation. -spec setZoom(This, Percent) -> 'ok' when This::wxPrintPreview(), Percent::integer(). setZoom(#wx_ref{type=ThisT,ref=ThisRef},Percent) when is_integer(Percent) -> ?CLASS(ThisT,wxPrintPreview), wxe_util:cast(?wxPrintPreview_SetZoom, <>). %% @doc Destroys this object, do not use object again -spec destroy(This::wxPrintPreview()) -> 'ok'. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxPrintPreview), wxe_util:destroy(?DESTROY_OBJECT,Obj), ok.