1 /* $XConsortium: DmxPrintOptions.h /main/6 1996/09/23 13:15:43 mgreess $ */
3 #ifndef _DMX_PRINT_OPTIONS_H
4 #define _DMX_PRINT_OPTIONS_H
11 * RESTRICTED CONFIDENTIAL INFORMATION:
13 * The information in this document is subject to special
14 * restrictions in a confidential disclosure agreement between
15 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
16 * document outside HP, IBM, Sun, USL, SCO, or Univel without
17 * Sun's specific written approval. This document and all copies
18 * and derivative works thereof must be returned or destroyed at
21 * Copyright 1994 Sun Microsystems, Inc. All rights reserved.
26 * Common Desktop Environment
28 * (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
29 * (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
30 * (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
31 * (c) Copyright 1993, 1994, 1995 Novell, Inc.
32 * (c) Copyright 1995 Digital Equipment Corp.
33 * (c) Copyright 1995 Fujitsu Limited
34 * (c) Copyright 1995 Hitachi, Ltd.
37 * RESTRICTED RIGHTS LEGEND
39 *Use, duplication, or disclosure by the U.S. Government is subject to
40 *restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
41 *Technical Data and Computer Software clause in DFARS 252.227-7013. Rights
42 *for non-DOD U.S. Government Departments and Agencies are as set forth in
43 *FAR 52.227-19(c)(1,2).
45 *Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A.
46 *International Business Machines Corp., Route 100, Somers, NY 10589 U.S.A.
47 *Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, CA 94043 U.S.A.
48 *Novell, Inc., 190 River Road, Summit, NJ 07901 U.S.A.
49 *Digital Equipment Corp., 111 Powdermill Road, Maynard, MA 01754, U.S.A.
50 *Fujitsu Limited, 1015, Kamikodanaka Nakahara-Ku, Kawasaki 211, Japan
51 *Hitachi, Ltd., 6, Kanda Surugadai 4-Chome, Chiyoda-ku, Tokyo 101, Japan
59 #include <sys/types.h>
61 #include <Dt/PrintOptionsP.h>
62 #include <DtMail/PropUi.hh>
64 #include "IndexedOptionMenu.h"
65 #include "UIComponent.h"
67 #define DMX_PROPKEY_HEADER_LEFT "headerleft"
68 #define DMX_PROPKEY_HEADER_RIGHT "headerright"
69 #define DMX_PROPKEY_FOOTER_LEFT "footerleft"
70 #define DMX_PROPKEY_FOOTER_RIGHT "footerright"
72 #define DMX_PROPKEY_MARGIN_TOP "margintop"
73 #define DMX_PROPKEY_MARGIN_RIGHT "marginright"
74 #define DMX_PROPKEY_MARGIN_BOTTOM "marginbottom"
75 #define DMX_PROPKEY_MARGIN_LEFT "marginleft"
77 #define DMX_PROPKEY_PRINT_HEADERS "printheaders"
78 #define DMX_PROPKEY_MESSAGE_SEPARATOR "messageseparator"
79 #define DMX_PROPKEY_SEPARATOR_STRING "separatorstring"
81 #define DMX_PROPVAL_EMPTY "Empty"
82 #define DMX_PROPVAL_CC_HEADER "CCHeader"
83 #define DMX_PROPVAL_DATE_HEADER "DateHeader"
84 #define DMX_PROPVAL_FROM_HEADER "FromHeader"
85 #define DMX_PROPVAL_SUBJECT_HEADER "SubjectHeader"
86 #define DMX_PROPVAL_TO_HEADER "ToHeader"
87 #define DMX_PROPVAL_PAGE_NUMBER "PageNumber"
88 #define DMX_PROPVAL_USER_NAME "UserName"
90 #define DMX_PROPVAL_DFLT_MARGIN "1.0 in"
92 #define DMX_PROPVAL_NONE "None"
93 #define DMX_PROPVAL_STANDARD "Standard"
94 #define DMX_PROPVAL_ABBREVIATED "Abbreviated"
95 #define DMX_PROPVAL_ALL "All"
97 #define DMX_PROPVAL_NEW_LINE "NewLine"
98 #define DMX_PROPVAL_BLANK_LINE "BlankLine"
99 #define DMX_PROPVAL_CHARACTER_LINE "CharacterLine"
100 #define DMX_PROPVAL_PAGE_BREAK "PageBreak"
101 #define DMX_PROPVAL_NEW_JOB "NewJob"
107 char *dflt_prop_string;
110 struct DmxpoPropValue
119 class DmxPrintOptions : public UIComponent
123 DtVirtArray<IndexedOptionMenu *>
125 DtVirtArray<PropUiItem *>
127 int _propui_array_iterator;
132 Widget _hdrftr_frame;
133 Widget _margin_frame;
135 IndexedOptionMenu *_msgsep_iom;
136 IndexedOptionMenu *_prthdr_iom;
138 PropSource *_prop_source;
140 PropUiItem *propKeyToPropItem(char*);
141 static DmxpoPropKey *enumToPropKey(int, int, DmxpoPropKey*);
142 static DmxpoPropValue *stringToPropValue(
146 static char *isValidMarginSpec(
151 DmxPrintOptions ( Widget );
152 ~DmxPrintOptions (void);
154 PropUiItem *getFirstProp(void);
155 PropUiItem *getNextProp(void);
156 int getNumProps(void);
158 static DmxStringTypeEnum getHdrFtrSpec(_DtPrintHdrFtrEnum which);
159 static const char *getMarginSpec(_DtPrintMarginEnum which);
160 static DmxMsgSeparatorEnum getMessageSeparator(void);
161 static DmxPrintHeadersEnum getPrintedHeaders(void);
162 static const char *getSeparatorString(void);
165 #endif // _DMX_PRINT_OPTIONS_H