Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * P r i n t J o b D i a l o g * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1999,2005 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXPrintDialog.h,v 1.16 2005/01/16 16:06:06 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXPRINTDIALOG_H 00025 #define FXPRINTDIALOG_H 00026 00027 #ifndef FXDIALOGBOX_H 00028 #include "FXDialogBox.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 class FXRadioButton; 00035 class FXComboBox; 00036 class FXListBox; 00037 class FXTextField; 00038 class FXSpinner; 00039 class FXIcon; 00040 00041 00042 /// Printer selection dialog 00043 class FXAPI FXPrintDialog : public FXDialogBox { 00044 FXDECLARE(FXPrintDialog) 00045 protected: 00046 FXRadioButton *sendtoprinter; 00047 FXComboBox *printername; 00048 FXRadioButton *sendtofile; 00049 FXTextField *filename; 00050 FXRadioButton *printall; 00051 FXRadioButton *printeven; 00052 FXRadioButton *printodd; 00053 FXRadioButton *printrange; 00054 FXRadioButton *firstpagefirst; 00055 FXRadioButton *lastpagefirst; 00056 FXRadioButton *printincolor; 00057 FXRadioButton *printinblacknwhite; 00058 FXRadioButton *orientportrait; 00059 FXRadioButton *orientlanscape; 00060 FXListBox *media; 00061 FXSpinner *firstpage; 00062 FXSpinner *lastpage; 00063 FXSpinner *numberofcopies; 00064 FXIcon *landscapeIcon; 00065 FXIcon *portraitIcon; 00066 FXPrinter printer; 00067 protected: 00068 FXPrintDialog(){} 00069 private: 00070 FXPrintDialog(const FXPrintDialog&); 00071 FXPrintDialog &operator=(const FXPrintDialog&); 00072 public: 00073 long onCmdToPrinter(FXObject*,FXSelector,void*); 00074 long onUpdToPrinter(FXObject*,FXSelector,void*); 00075 long onCmdToFile(FXObject*,FXSelector,void*); 00076 long onUpdToFile(FXObject*,FXSelector,void*); 00077 long onCmdBrowse(FXObject*,FXSelector,void*); 00078 long onUpdBrowse(FXObject*,FXSelector,void*); 00079 long onCmdProps(FXObject*,FXSelector,void*); 00080 long onUpdProps(FXObject*,FXSelector,void*); 00081 long onCmdPortrait(FXObject*,FXSelector,void*); 00082 long onUpdPortrait(FXObject*,FXSelector,void*); 00083 long onCmdLandscape(FXObject*,FXSelector,void*); 00084 long onUpdLandscape(FXObject*,FXSelector,void*); 00085 long onCmdPages(FXObject*,FXSelector,void*); 00086 long onUpdPages(FXObject*,FXSelector,void*); 00087 long onCmdColor(FXObject*,FXSelector,void*); 00088 long onUpdColor(FXObject*,FXSelector,void*); 00089 long onCmdGray(FXObject*,FXSelector,void*); 00090 long onUpdGray(FXObject*,FXSelector,void*); 00091 long onCmdNumCopies(FXObject*,FXSelector,void*); 00092 long onUpdNumCopies(FXObject*,FXSelector,void*); 00093 long onCmdFirstPage(FXObject*,FXSelector,void*); 00094 long onUpdFirstPage(FXObject*,FXSelector,void*); 00095 long onCmdLastPage(FXObject*,FXSelector,void*); 00096 long onUpdLastPage(FXObject*,FXSelector,void*); 00097 long onCmdCollateNormal(FXObject*,FXSelector,void*); 00098 long onUpdCollateNormal(FXObject*,FXSelector,void*); 00099 long onCmdCollateReversed(FXObject*,FXSelector,void*); 00100 long onUpdCollateReversed(FXObject*,FXSelector,void*); 00101 long onCmdFileName(FXObject*,FXSelector,void*); 00102 long onUpdFileName(FXObject*,FXSelector,void*); 00103 long onCmdPrinterName(FXObject*,FXSelector,void*); 00104 long onUpdPrinterName(FXObject*,FXSelector,void*); 00105 long onCmdAccept(FXObject*,FXSelector,void*); 00106 long onCmdMedia(FXObject*,FXSelector,void*); 00107 long onUpdMedia(FXObject*,FXSelector,void*); 00108 public: 00109 enum{ 00110 ID_TO_PRINTER=FXDialogBox::ID_LAST, 00111 ID_TO_FILE, 00112 ID_PRINTER_NAME, 00113 ID_FILE_NAME, 00114 ID_LANDSCAPE, 00115 ID_PORTRAIT, 00116 ID_MEDIA, 00117 ID_COLLATE_NORMAL, 00118 ID_COLLATE_REVERSED, 00119 ID_PAGES_ALL, 00120 ID_PAGES_EVEN, 00121 ID_PAGES_ODD, 00122 ID_PAGES_RANGE, 00123 ID_PAGES_FIRST, 00124 ID_PAGES_LAST, 00125 ID_BROWSE_FILE, 00126 ID_PROPERTIES, 00127 ID_COLOR_PRINTER, 00128 ID_GRAY_PRINTER, 00129 ID_NUM_COPIES 00130 }; 00131 public: 00132 00133 /// Construct print dialog 00134 FXPrintDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0); 00135 00136 /// Create dialog 00137 virtual void create(); 00138 00139 /// Set printer info 00140 void setPrinter(const FXPrinter& pr); 00141 00142 /// Get printer info 00143 void getPrinter(FXPrinter& pr); 00144 00145 /// Save dialog to a stream 00146 virtual void save(FXStream& store) const; 00147 00148 /// Load dialog from a stream 00149 virtual void load(FXStream& store); 00150 00151 /// Destructor 00152 virtual ~FXPrintDialog(); 00153 }; 00154 00155 } 00156 00157 #endif
Copyright © 1997-2005 Jeroen van der Zijp |