]>
git.saurik.com Git - wxWidgets.git/blob - samples/html/printing/printing.h
3 * Purpose: Printing demo for wxWindows class library
7 * Copyright: (c) 1995, AIAI, University of Edinburgh
10 /* sccsid[] = "%W% %G%" */
16 // Define a new application
17 class MyApp
: public wxApp
29 // Define a new canvas and frame
30 class MyFrame
: public wxFrame
33 MyFrame(wxFrame
*frame
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
);
35 void OnPrint(wxCommandEvent
& event
);
36 void OnPrintPreview(wxCommandEvent
& event
);
37 void OnPrintSetup(wxCommandEvent
& event
);
38 void OnPageSetup(wxCommandEvent
& event
);
39 #if defined(__WXMSW__) && wxTEST_POSTSCRIPT_IN_MSW
40 void OnPrintPS(wxCommandEvent
& event
);
41 void OnPrintPreviewPS(wxCommandEvent
& event
);
42 void OnPrintSetupPS(wxCommandEvent
& event
);
43 void OnPageSetupPS(wxCommandEvent
& event
);
46 void OnExit(wxCommandEvent
& event
);
47 void OnPrintAbout(wxCommandEvent
& event
);
52 class MyPrintout
: public wxPrintout
55 MyPrintout(char *title
= "My printout"):wxPrintout(title
) {}
56 bool OnPrintPage(int page
);
57 bool HasPage(int page
);
58 bool OnBeginDocument(int startPage
, int endPage
);
59 void GetPageInfo(int *minPage
, int *maxPage
, int *selPageFrom
, int *selPageTo
);
61 void DrawPageOne(wxDC
*dc
);
64 #define WXPRINT_QUIT 100
65 #define WXPRINT_PRINT 101
66 #define WXPRINT_PRINT_SETUP 102
67 #define WXPRINT_PAGE_SETUP 103
68 #define WXPRINT_PREVIEW 104
70 #define WXPRINT_PRINT_PS 105
71 #define WXPRINT_PRINT_SETUP_PS 106
72 #define WXPRINT_PAGE_SETUP_PS 107
73 #define WXPRINT_PREVIEW_PS 108
75 #define WXPRINT_ABOUT 109