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

Generated on Tue Dec 14 13:18:29 2004 for TNTsdk by  doxygen 1.3.8-20040913