File: Printout.xs

package info (click to toggle)
libwx-perl 0.9702-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,240 kB
  • ctags: 1,812
  • sloc: cpp: 8,988; perl: 6,366; makefile: 38; ansic: 1
file content (231 lines) | stat: -rwxr-xr-x 4,785 bytes parent folder | download
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
#############################################################################
## Name:        ext/print/XS/Printout.xs
## Purpose:     XS for Wx::Printout & Wx::PrinterDC
## Author:      Mattia Barbon
## Modified by:
## Created:     02/06/2001
## RCS-ID:      $Id: Printout.xs 2315 2008-01-18 21:47:17Z mbarbon $
## Copyright:   (c) 2001-2002, 2004, 2008 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

#include <wx/print.h>
#include <wx/dcprint.h>
#include "cpp/printout.h"

MODULE=Wx PACKAGE=Wx::PrinterDC

#if defined( __WXMSW__ )

wxPrinterDC*
wxPrinterDC::new( data )
    wxPrintData* data
  CODE:
    RETVAL = new wxPrinterDC( *data );
  OUTPUT:
    RETVAL

wxRect*
wxPrinterDC::GetPaperRect()
  CODE:
    RETVAL = new wxRect( THIS->GetPaperRect() );
  OUTPUT: RETVAL

#endif

MODULE=Wx PACKAGE=Wx::Printout

wxPrintout*
wxPrintout::new( title = wxT("Printout") )
    wxString title
  CODE:
    RETVAL = new wxPlPrintout( CLASS, title );
  OUTPUT:
    RETVAL

void
wxPrintout::Destroy()
  CODE:
    delete THIS;

wxDC*
wxPrintout::GetDC()
  OUTPUT:
    RETVAL
  CLEANUP:
    wxPli_object_set_deleteable( aTHX_ ST(0), false );

void
wxPrintout::GetPageInfo()
  PREINIT:
    int minPage, maxPage, pageFrom, pageTo;
  PPCODE:
    THIS->wxPrintout::GetPageInfo( &minPage, &maxPage, &pageFrom, &pageTo );
    EXTEND( SP, 4 );
    PUSHs( sv_2mortal( newSViv( minPage ) ) );
    PUSHs( sv_2mortal( newSViv( maxPage ) ) );
    PUSHs( sv_2mortal( newSViv( pageFrom ) ) );
    PUSHs( sv_2mortal( newSViv( pageTo ) ) );

void
wxPrintout::GetPageSizeMM()
  PREINIT:
    int w, h;
  PPCODE:
    THIS->GetPageSizeMM( &w, &h );
    EXTEND( SP, 2 );
    PUSHs( sv_2mortal( newSViv( w ) ) );
    PUSHs( sv_2mortal( newSViv( h ) ) );

void
wxPrintout::GetPageSizePixels()
  PREINIT:
    int w, h;
  PPCODE:
    THIS->GetPageSizePixels( &w, &h );
    EXTEND( SP, 2 );
    PUSHs( sv_2mortal( newSViv( w ) ) );
    PUSHs( sv_2mortal( newSViv( h ) ) );

void
wxPrintout::GetPPIPrinter()
  PREINIT:
    int w, h;
  PPCODE:
    THIS->GetPPIPrinter( &w, &h );
    EXTEND( SP, 2 );
    PUSHs( sv_2mortal( newSViv( w ) ) );
    PUSHs( sv_2mortal( newSViv( h ) ) );

void
wxPrintout::GetPPIScreen()
  PREINIT:
    int w, h;
  PPCODE:
    THIS->GetPPIScreen( &w, &h );
    EXTEND( SP, 2 );
    PUSHs( sv_2mortal( newSViv( w ) ) );
    PUSHs( sv_2mortal( newSViv( h ) ) );

#if WXPERL_W_VERSION_GE( 2, 7, 2 )

wxRect*
wxPrintout::GetPaperRectPixels()
  CODE:
    RETVAL = new wxRect( THIS->GetPaperRectPixels() );
  OUTPUT: RETVAL

#endif

wxString
wxPrintout::GetTitle()

bool
wxPrintout::HasPage( pageNum )
    int pageNum
  CODE:
    RETVAL = THIS->wxPrintout::HasPage( pageNum );
  OUTPUT:
    RETVAL

bool
wxPrintout::IsPreview()

bool
wxPrintout::OnBeginDocument( startPage, endPage )
    int startPage
    int endPage
  CODE:
    RETVAL = THIS->wxPrintout::OnBeginDocument( startPage, endPage );
  OUTPUT:
    RETVAL

void
wxPrintout::OnEndDocument()
  CODE:
    THIS->wxPrintout::OnEndDocument();

void
wxPrintout::OnBeginPrinting()
  CODE:
    THIS->wxPrintout::OnBeginPrinting();

void
wxPrintout::OnEndPrinting()
  CODE:
    THIS->wxPrintout::OnEndPrinting();

void
wxPrintout::OnPreparePrinting()
  CODE:
    THIS->wxPrintout::OnPreparePrinting();

#bool
#wxPrintout::OnPrintPage( pageNum )
#    int pageNum
#  CODE:
#    RETVAL = THIS->wxPrintout::OnPrintPage( pageNum );
#  OUTPUT:
#    RETVAL

#if WXPERL_W_VERSION_GE( 2, 7, 2 )

void
wxPrintout::FitThisSizeToPaper( imageSize )
    wxSize imageSize

void
wxPrintout::FitThisSizeToPage( imageSize )
    wxSize imageSize

void
wxPrintout::FitThisSizeToPageMargins( imageSize, pageSetupData )
    wxSize imageSize
    wxPageSetupDialogData* pageSetupData
  C_ARGS: imageSize, *pageSetupData

void
wxPrintout::MapScreenSizeToPaper()

void
wxPrintout::MapScreenSizeToPage()

void
wxPrintout::MapScreenSizeToPageMargins( pageSetupData )
    wxPageSetupDialogData* pageSetupData
  C_ARGS: *pageSetupData

void
wxPrintout::MapScreenSizeToDevice()

wxRect*
wxPrintout::GetLogicalPaperRect()
  CODE:
    RETVAL = new wxRect( THIS->GetLogicalPaperRect() );
  OUTPUT: RETVAL

wxRect*
wxPrintout::GetLogicalPageRect()
  CODE:
    RETVAL = new wxRect( THIS->GetLogicalPageRect() );
  OUTPUT: RETVAL

wxRect*
wxPrintout::GetLogicalPageMarginsRect( pageSetupData )
    wxPageSetupDialogData* pageSetupData
  CODE:
    RETVAL = new wxRect( THIS->GetLogicalPageMarginsRect( *pageSetupData ) );
  OUTPUT: RETVAL

void
wxPrintout::SetLogicalOrigin( x, y )
    wxCoord x
    wxCoord y

void
wxPrintout::OffsetLogicalOrigin( xoff, yoff )
    wxCoord xoff
    wxCoord yoff

#endif