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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXPrintDialog.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                        P r i n t   J o b   D i a l o g                        *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXPRINTDIALOG_H
00022 #define FXPRINTDIALOG_H
00023 
00024 #ifndef FXDIALOGBOX_H
00025 #include "FXDialogBox.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXRadioButton;
00032 class FXComboBox;
00033 class FXListBox;
00034 class FXTextField;
00035 class FXSpinner;
00036 class FXIcon;
00037 
00038 
00040 class FXAPI FXPrintDialog : public FXDialogBox {
00041   FXDECLARE(FXPrintDialog)
00042 protected:
00043   FXRadioButton *sendtoprinter;
00044   FXComboBox    *printername;
00045   FXRadioButton *sendtofile;
00046   FXTextField   *filename;
00047   FXRadioButton *printall;
00048   FXRadioButton *printeven;
00049   FXRadioButton *printodd;
00050   FXRadioButton *printrange;
00051   FXRadioButton *firstpagefirst;
00052   FXRadioButton *lastpagefirst;
00053   FXRadioButton *printincolor;
00054   FXRadioButton *printinblacknwhite;
00055   FXRadioButton *orientportrait;
00056   FXRadioButton *orientlanscape;
00057   FXListBox     *media;
00058   FXSpinner     *firstpage;
00059   FXSpinner     *lastpage;
00060   FXSpinner     *numberofcopies;
00061   FXIcon        *landscapeIcon;
00062   FXIcon        *portraitIcon;
00063   FXPrinter      printer;
00064 protected:
00065   FXPrintDialog(){}
00066 private:
00067   FXPrintDialog(const FXPrintDialog&);
00068   FXPrintDialog &operator=(const FXPrintDialog&);
00069 public:
00070   long onCmdToPrinter(FXObject*,FXSelector,void*);
00071   long onUpdToPrinter(FXObject*,FXSelector,void*);
00072   long onCmdToFile(FXObject*,FXSelector,void*);
00073   long onUpdToFile(FXObject*,FXSelector,void*);
00074   long onCmdBrowse(FXObject*,FXSelector,void*);
00075   long onUpdBrowse(FXObject*,FXSelector,void*);
00076   long onCmdProps(FXObject*,FXSelector,void*);
00077   long onUpdProps(FXObject*,FXSelector,void*);
00078   long onCmdPortrait(FXObject*,FXSelector,void*);
00079   long onUpdPortrait(FXObject*,FXSelector,void*);
00080   long onCmdLandscape(FXObject*,FXSelector,void*);
00081   long onUpdLandscape(FXObject*,FXSelector,void*);
00082   long onCmdPages(FXObject*,FXSelector,void*);
00083   long onUpdPages(FXObject*,FXSelector,void*);
00084   long onCmdColor(FXObject*,FXSelector,void*);
00085   long onUpdColor(FXObject*,FXSelector,void*);
00086   long onCmdGray(FXObject*,FXSelector,void*);
00087   long onUpdGray(FXObject*,FXSelector,void*);
00088   long onCmdNumCopies(FXObject*,FXSelector,void*);
00089   long onUpdNumCopies(FXObject*,FXSelector,void*);
00090   long onCmdFirstPage(FXObject*,FXSelector,void*);
00091   long onUpdFirstPage(FXObject*,FXSelector,void*);
00092   long onCmdLastPage(FXObject*,FXSelector,void*);
00093   long onUpdLastPage(FXObject*,FXSelector,void*);
00094   long onCmdCollateNormal(FXObject*,FXSelector,void*);
00095   long onUpdCollateNormal(FXObject*,FXSelector,void*);
00096   long onCmdCollateReversed(FXObject*,FXSelector,void*);
00097   long onUpdCollateReversed(FXObject*,FXSelector,void*);
00098   long onCmdFileName(FXObject*,FXSelector,void*);
00099   long onUpdFileName(FXObject*,FXSelector,void*);
00100   long onCmdPrinterName(FXObject*,FXSelector,void*);
00101   long onUpdPrinterName(FXObject*,FXSelector,void*);
00102   long onCmdAccept(FXObject*,FXSelector,void*);
00103   long onCmdMedia(FXObject*,FXSelector,void*);
00104   long onUpdMedia(FXObject*,FXSelector,void*);
00105 public:
00106   enum{
00107     ID_TO_PRINTER=FXDialogBox::ID_LAST,
00108     ID_TO_FILE,
00109     ID_PRINTER_NAME,
00110     ID_FILE_NAME,
00111     ID_LANDSCAPE,
00112     ID_PORTRAIT,
00113     ID_MEDIA,
00114     ID_COLLATE_NORMAL,
00115     ID_COLLATE_REVERSED,
00116     ID_PAGES_ALL,
00117     ID_PAGES_EVEN,
00118     ID_PAGES_ODD,
00119     ID_PAGES_RANGE,
00120     ID_PAGES_FIRST,
00121     ID_PAGES_LAST,
00122     ID_BROWSE_FILE,
00123     ID_PROPERTIES,
00124     ID_COLOR_PRINTER,
00125     ID_GRAY_PRINTER,
00126     ID_NUM_COPIES
00127     };
00128 public:
00129 
00131   FXPrintDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00132 
00134   virtual void create();
00135 
00137   void setPrinter(const FXPrinter& pr);
00138 
00140   void getPrinter(FXPrinter& pr);
00141 
00143   virtual void save(FXStream& store) const;
00144 
00146   virtual void load(FXStream& store);
00147 
00149   virtual ~FXPrintDialog();
00150   };
00151 
00152 }
00153 
00154 #endif

Copyright © 1997-2011 Jeroen van der Zijp