Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXPrintDialog.h
1 /********************************************************************************
2 * *
3 * P r i n t J o b D i a l o g *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1999,2024 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXPRINTDIALOG_H
22 #define FXPRINTDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXRadioButton;
32 class FXComboBox;
33 class FXListBox;
34 class FXTextField;
35 class FXSpinner;
36 class FXIcon;
37 
38 
40 class FXAPI FXPrintDialog : public FXDialogBox {
41  FXDECLARE(FXPrintDialog)
42 protected:
43  FXRadioButton *sendtoprinter;
44  FXComboBox *printername;
45  FXRadioButton *sendtofile;
46  FXTextField *filename;
47  FXRadioButton *printall;
48  FXRadioButton *printeven;
49  FXRadioButton *printodd;
50  FXRadioButton *printrange;
51  FXRadioButton *firstpagefirst;
52  FXRadioButton *lastpagefirst;
53  FXRadioButton *printincolor;
54  FXRadioButton *printinblacknwhite;
55  FXRadioButton *orientportrait;
56  FXRadioButton *orientlanscape;
57  FXListBox *media;
58  FXSpinner *firstpage;
59  FXSpinner *lastpage;
60  FXSpinner *numberofcopies;
61  FXIcon *landscapeIcon;
62  FXIcon *portraitIcon;
63  FXPrinter printer;
64 protected:
65  FXPrintDialog(){}
66 private:
68  FXPrintDialog &operator=(const FXPrintDialog&);
69 public:
70  long onCmdToPrinter(FXObject*,FXSelector,void*);
71  long onUpdToPrinter(FXObject*,FXSelector,void*);
72  long onCmdToFile(FXObject*,FXSelector,void*);
73  long onUpdToFile(FXObject*,FXSelector,void*);
74  long onCmdBrowse(FXObject*,FXSelector,void*);
75  long onUpdBrowse(FXObject*,FXSelector,void*);
76  long onCmdProps(FXObject*,FXSelector,void*);
77  long onUpdProps(FXObject*,FXSelector,void*);
78  long onCmdPortrait(FXObject*,FXSelector,void*);
79  long onUpdPortrait(FXObject*,FXSelector,void*);
80  long onCmdLandscape(FXObject*,FXSelector,void*);
81  long onUpdLandscape(FXObject*,FXSelector,void*);
82  long onCmdPages(FXObject*,FXSelector,void*);
83  long onUpdPages(FXObject*,FXSelector,void*);
84  long onCmdColor(FXObject*,FXSelector,void*);
85  long onUpdColor(FXObject*,FXSelector,void*);
86  long onCmdGray(FXObject*,FXSelector,void*);
87  long onUpdGray(FXObject*,FXSelector,void*);
88  long onCmdNumCopies(FXObject*,FXSelector,void*);
89  long onUpdNumCopies(FXObject*,FXSelector,void*);
90  long onCmdFirstPage(FXObject*,FXSelector,void*);
91  long onUpdFirstPage(FXObject*,FXSelector,void*);
92  long onCmdLastPage(FXObject*,FXSelector,void*);
93  long onUpdLastPage(FXObject*,FXSelector,void*);
94  long onCmdCollateNormal(FXObject*,FXSelector,void*);
95  long onUpdCollateNormal(FXObject*,FXSelector,void*);
96  long onCmdCollateReversed(FXObject*,FXSelector,void*);
97  long onUpdCollateReversed(FXObject*,FXSelector,void*);
98  long onCmdFileName(FXObject*,FXSelector,void*);
99  long onUpdFileName(FXObject*,FXSelector,void*);
100  long onCmdPrinterName(FXObject*,FXSelector,void*);
101  long onUpdPrinterName(FXObject*,FXSelector,void*);
102  long onCmdAccept(FXObject*,FXSelector,void*);
103  long onCmdMedia(FXObject*,FXSelector,void*);
104  long onUpdMedia(FXObject*,FXSelector,void*);
105 public:
106  enum{
107  ID_TO_PRINTER=FXDialogBox::ID_LAST,
108  ID_TO_FILE,
109  ID_PRINTER_NAME,
110  ID_FILE_NAME,
111  ID_LANDSCAPE,
112  ID_PORTRAIT,
113  ID_MEDIA,
114  ID_COLLATE_NORMAL,
115  ID_COLLATE_REVERSED,
116  ID_PAGES_ALL,
117  ID_PAGES_EVEN,
118  ID_PAGES_ODD,
119  ID_PAGES_RANGE,
120  ID_PAGES_FIRST,
121  ID_PAGES_LAST,
122  ID_BROWSE_FILE,
123  ID_PROPERTIES,
124  ID_COLOR_PRINTER,
125  ID_GRAY_PRINTER,
126  ID_NUM_COPIES
127  };
128 public:
129 
131  FXPrintDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
132 
134  virtual void create();
135 
137  void setPrinter(const FXPrinter& pr);
138 
140  void getPrinter(FXPrinter& pr);
141 
143  virtual void save(FXStream& store) const;
144 
146  virtual void load(FXStream& store);
147 
149  virtual ~FXPrintDialog();
150  };
151 
152 }
153 
154 #endif
DialogBox window.
Definition: FXDialogBox.h:37
Printer selection dialog.
Definition: FXPrintDialog.h:40
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
The List Box is a control to select one of a list of options.
Definition: FXListBox.h:55
Describes printer.
Definition: FXDCPrint.h:78
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
A text field is a single-line text entry widget.
Definition: FXTextField.h:63
Spinner control.
Definition: FXSpinner.h:46
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
A radio button is a tri-state button.
Definition: FXRadioButton.h:51
A Combo Box provides a way to select a string from a list of strings.
Definition: FXComboBox.h:65
Closes the dialog, accept the entry.
Definition: FXDialogBox.h:51
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp