mplayout.h

Go to the documentation of this file.
00001 /**
00002  * \file mplayout.h <mi32/mplayout.h>
00003  * \brief Definitions for Map & Poster layout
00004  *
00005  * \if NODOC
00006  * $Id: mplayout.h_v 1.37 2005/03/31 16:57:18 fileserver!dwilliss Exp $
00007  *
00008  * $Log: mplayout.h_v $
00009  * Revision 1.37  2005/03/31 16:57:18  fileserver!dwilliss
00010  * Rename one of our types to MIUNICODE because it conflicted with a Microsoft #define
00011  *
00012  * Revision 1.36  2003/09/15 13:49:56  fileserver!dwilliss
00013  * Doxygen
00014  *
00015  * Revision 1.35  2003/06/16 22:56:13  dwilliss
00016  * Added Serlialzer itemdef method
00017  *
00018  * Revision 1.34  2003/06/06 22:32:15  dwilliss
00019  * Changed prototype of MprintPageSetup.
00020  *
00021  * Revision 1.33  2003/05/30 22:26:40  ldyas
00022  * *** empty log message ***
00023  *
00024  * Revision 1.32  2003/05/30 22:20:22  ldyas
00025  * LAYOUTPARMS now has = operator.
00026  *
00027  * Revision 1.31  2003/05/28 15:06:38  dwilliss
00028  * Added ICM profile members
00029  *
00030  * Revision 1.30  2003/04/29 15:20:34  dwilliss
00031  * Ok, ready to commit it now...
00032  *
00033  * Revision 1.29  2003/04/29 14:39:59  dwilliss
00034  * *** empty log message ***
00035  *
00036  * Revision 1.28  2003/04/29 14:28:26  dwilliss
00037  * Added some dither pattern parameters to LAYOUTPARMS
00038  *
00039  * Revision 1.27  2002/08/14 22:41:33  dwilliss
00040  * Paper size is now Unicode
00041  *
00042  * Revision 1.26  2000/06/22 21:24:49  sparsons
00043  * Genitor documentation.
00044  *
00045  * Revision 1.25  2000/04/28 21:56:07  mju
00046  * Use CONTRINFO instead of CONTRiNFO2.
00047  *
00048  * Revision 1.24  1999/05/07 21:19:50  mju
00049  * Header restruct.
00050  *
00051  * Revision 1.23  1999/03/17  22:54:06  mju
00052  * GRE_LAYOUT is now a class.
00053  *
00054  * Revision 1.22  1999/02/03  22:48:03  dwilliss
00055  * Added FullPage flag
00056  *
00057  * Revision 1.21  1999/01/05 19:02:03  scowan
00058  * Swapped multiple keywords
00059  *
00060  * Revision 1.20  1998/12/22 20:20:28  mju
00061  * Add check for X-specific stuff.
00062  *
00063  * Revision 1.11  1997/09/29  17:34:19  dwilliss
00064  * Defined PRSETUP_OldPrint
00065  *
00066  * Revision 1.10  1997/09/24  23:04:58  dwilliss
00067  * Added Zoom to LAYOUTPARMS
00068  *
00069  * Revision 1.9  1997/09/16  17:21:18  coffee!dwilliss
00070  * Increased size of printer and paper size strings
00071  *
00072  * Revision 1.8  1997/09/05  17:40:23  dwilliss
00073  * Added MAPLAYOUT_Landscape flag
00074  *
00075  * Revision 1.7  1997/08/07  16:04:59  dwilliss
00076  * Prototype MprintLayoutSetup
00077  *
00078  * Revision 1.4  1997/08/04  16:17:15  dwilliss
00079  * Added proto for MprintTestStripDialog()
00080  * Made prototype for MprintPageSetup() more strict if
00081  * INC_MI32_MDISP_H is defined.  Old code may get proto
00082  * from dispwind.h anyway.
00083  *
00084  * Revision 1.1  1997/05/02  14:35:09  mju
00085  * Initial revision
00086  *
00087  * \endif
00088 **/
00089 
00090 #ifndef  INC_MI32_MPLAYOUT_H
00091 #define  INC_MI32_MPLAYOUT_H
00092 
00093 #ifndef INC_MI32_CONTRAST_H
00094    #include <mi32/contrast.h>    //! For Defn of CONTRINFO
00095 #endif
00096 
00097 #ifndef INC_MI32_FILEPATH_H
00098    #include <mi32/filepath.h>
00099 #endif
00100 
00101 #ifndef INC_MI32_COLORBAL_H
00102    #include <mi32/colorbal.h>    //! for defn of CBPARMS
00103 #endif
00104 
00105 #ifndef INC_MI32_SERIALIZ_H
00106    #include <mi32/serializ.h>
00107 #endif
00108 
00109 #ifndef INC_MI32_MG2CMS_H
00110    #include <mi32/mg2cms.h>      //! for defn of PROFILE
00111 #endif
00112 
00113 //! Forward declaration
00114 
00115 class GRE_LAYOUT;
00116 
00117 
00118 //----------------------------------------------------------------------------
00119 //!      Structures and constants                                                
00120 //----------------------------------------------------------------------------
00121 
00122 //! Hardcopy layout parameters.
00123 struct LAYOUTPARMS {
00124 
00125    LAYOUTPARMS();
00126    ~LAYOUTPARMS();
00127    LAYOUTPARMS(const LAYOUTPARMS&);
00128 
00129    LAYOUTPARMS& operator=(const LAYOUTPARMS&);
00130 
00131    static const SERIALIZER::ITEMDEF* GetSerialItemDef();
00132 
00133    //! Read LAYOUTPARMS from Ini file.
00134    ERRVALUE ReadDefault();
00135 
00136    //! Write LAYOUTPARMS to Ini file.
00137    ERRVALUE WriteDefault();
00138 
00139 
00140    double FullHeight;                  //!< Full height including margins in inches
00141    double FullWidth;                   //!< Full width including margins in inches
00142    double FullPrintableHeight;         //!< Full printable height (user selected) in inches
00143    double FullPrintableWidth;          //!< Full printable width (user selected) in inches
00144    double PrintableHeight;             //!< Printable height of a single page in inches (fixed)
00145    double PrintableWidth;              //!< Printable width of a single page in inches (fixed)
00146    double LeftMargin;                  //!< Unprintable left margin in inches (fixed)
00147    double TopMargin;                   //!< Unprintable top margin in inches (fixed)
00148    double Scale;                       //!< eg: 24000 for 1:24000 (Should have been named MapScale)
00149    double Zoom;                        //!< Zoom factor (normally 1.0)
00150    double dpi;                         //!< Printer resolution in dots/inch
00151    INT32  flags;                       //!< misc flags, see below
00152    char   printer[64];  //!< Name of driver object.  Not localizable.
00153    MIUNICODE    paper[64];
00154    char   rpattern[32];
00155    char   vpattern[32];
00156    double contrast;
00157    double brightness;
00158    CBPARMS  cbparms;                   //!< Color balance parameters
00159    CONTRINFO   gamma[3];
00160    double DotGain[4];      //!< Percent (0.0 to 1.0)
00161    double ScreenAngle[4];  //!< in degrees
00162    double ScreenFreq;      //!< in LPI. All componants must be same frequency
00163    MGD::PROFILEPARMS_PRINTER ProfileParms;      
00164    };
00165 
00166 PREVENT_MEMFUNC(LAYOUTPARMS)
00167 
00168 #define MAPLAYOUT_SetupDone   (0x00000001)
00169 #define MAPLAYOUT_BogusSizes  (0x00000002)   //! using 8.5 x 11 (No printer selected yet)
00170 #define MAPLAYOUT_PenPlotter  (0x00000004)
00171 #define MAPLAYOUT_UserCBal    (0x00000008)
00172 #define MAPLAYOUT_UserGamma   (0x00000010)
00173 #define MAPLAYOUT_MirrorImage (0x00000020)
00174 #define MAPLAYOUT_CutLine     (0x00000040)
00175 #define MAPLAYOUT_PrintNow    (0x00000080)
00176 #define MAPLAYOUT_TempRast    (0x00000100)
00177 #define MAPLAYOUT_Landscape   (0x00000200)   //! Sizes in LAYOUTPARMS are rotated 90 degrees from actual paper
00178 #define MAPLAYOUT_ScaleToPage (0x00000400)   //! Adjust Zoom to make the layout fit the page
00179 #define MAPLAYOUT_FullPage    (0x00000800)   //! Keep "full page" when modifying paper sizes
00180 
00181 //----------------------------------------------------------------------------
00182 //!      Flags for MprintPageSetup                                            
00183 //----------------------------------------------------------------------------
00184 
00185 #define PRSETUP_FromRast   0x00000001  //!< For Support / Print From / Print Raster...
00186 #define PRSETUP_PRF        0x00000002  //!< For Support / Print From / Print File...
00187 #define PRSETUP_NoPrint    0x00000004  //!< changes "print" button to "ok"
00188 #define PRSETUP_NoManage   0x00000008  //!< Check settings, but don't popup unless problem
00189 #define PRSETUP_Snapshot   0x00000010  //!< Printing a snapshot
00190 #define PRSETUP_OldPrint   0x80000000  //!< Being called from pre-tntdisp print
00191 
00192 //----------------------------------------------------------------------------
00193 //!      Functions and Macros                                                    
00194 //----------------------------------------------------------------------------
00195 
00196 struct PRINTERDRIVER;
00197 struct PRINTEROPTIONS;
00198 
00199 extern "C" {
00200 
00201 //! Read LAYOUTPARMS from Ini file.
00202 int MxReadDefaultLayout (
00203    LAYOUTPARMS *parms
00204    );
00205 
00206 //! Write LAYOUTPARMS to Ini file.
00207 int MxWriteDefaultLayout (
00208    LAYOUTPARMS *parms
00209    );
00210 
00211 //!   Print test strip dialog.
00212 //! 
00213 //! Note.  Except for the 3rd parm which changes from a DWWINDOW to an MDISPLAYOUT 
00214 //! The API of this function cannot change until we eliminate printrvc.
00215 //!
00216 //!   This function gets passed to MprintSetup as it's 3rd parameter.  It's assumed
00217 //!   that the 4th parameter to MprintSetup (the HookData) is really an MDISPLAYOUT
00218 //! and that that gets passed to us as our 3rd parameter.
00219 //!
00220 //!   If "parent" is not NULL, then it will create a non-modal dialog for keeping 
00221 //! track of test strip data.  The main form widget for this dialog is returned
00222 //! in *RetWidget.
00223 //!   If parent is NULL, it just looks at the mode parameter and changes the formatting
00224 //!   of its list widget to match the given mode.  
00225 //!
00226 //!   It is also assumed that the CBPARMS and CONTRINFO2 passed to the function
00227 //!   will stay in the same memory location for the life of the dialog (which
00228 //!   is non-modal).  When the user clicks the "add" button on the dialog, it
00229 //!   makes copies of these structures.
00230 //!
00231 //! The cbfunc is called whenever the user selects a line from the list widget
00232 //!   of test settings.  cbfunc will be called and given the CBPARMS and CONTRINFO2
00233 //!   that were saved for that test.  It's up to cbfunc to adjust the color balance
00234 //!   controls to show those settings.
00235 //!
00236 int MprintTestStripDialog (
00237    Widget parent, 
00238    Widget *RetWidget, 
00239    GRE_LAYOUT *layout, 
00240    CBPARMS *cbal, 
00241    CONTRINFO *cont, 
00242    void (*cbfunc)(void *, CBPARMS *, CONTRINFO *), 
00243    void *cbdata, 
00244    PRINTERDRIVER *PrinterDriver,
00245    PRINTEROPTIONS *PrinterParms,
00246    int mode
00247    );
00248 
00249 //! Print page setup.
00250 int MprintPageSetup (
00251    Widget parent, 
00252    GRE_LAYOUT *layout,
00253    int (*TestStripFunc)(Widget, Widget*, GRE_LAYOUT*, CBPARMS*,CONTRINFO*, 
00254       void (*func)(void*, CBPARMS*, CONTRINFO*),void*, PRINTERDRIVER *PrinterDriver,
00255       PRINTEROPTIONS *PrinterParms, int) = 0,  //!< ie, MprintTestStripDialog
00256    UINT32 flags = 0
00257    );
00258 
00259 //! Print layout setup.
00260 int MprintLayoutSetup (
00261    Widget parent, 
00262    GRE_LAYOUT *layout, 
00263    UINT32 flags
00264    );
00265 
00266 }  // extern "C"
00267 
00268 #endif   //!< #ifndef INC_MI32_MPLAYOUT_H

Generated on Wed May 31 15:27:00 2006 for TNTsdk by  doxygen 1.3.8-20040913