2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
26 * $TOG: ViewMsgDialog.h /main/5 1998/01/28 18:36:00 mgreess $
28 * RESTRICTED CONFIDENTIAL INFORMATION:
30 * The information in this document is subject to special
31 * restrictions in a confidential disclosure agreement between
32 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
33 * document outside HP, IBM, Sun, USL, SCO, or Univel without
34 * Sun's specific written approval. This document and all copies
35 * and derivative works thereof must be returned or destroyed at
38 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
43 #ifndef VIEWMSGDIALOG_H
44 #define VIEWMSGDIALOG_H
46 #include <DtMail/DtMail.hh>
47 #include "DialogShell.h"
50 #include "AttachArea.h"
51 #include "DtMailEditor.hh"
52 #include "MenuWindow.h"
54 #include "DtMailGenDialog.hh"
58 #include "IconifyCmd.h"
61 #include <DtMail/DtMailError.hh>
64 // Forward declarations
70 class ViewMsgDialog : public DialogShell, public AbstractEditorParent {
74 ViewMsgDialog(RoamMenuWindow*, WidgetClass wc=xmDialogShellWidgetClass);
75 virtual ~ViewMsgDialog();
77 virtual void initialize();
80 virtual const char *const className () { return "ViewMsg"; }
81 void propsChanged(void);
86 // AttachArea *attachArea(){ return _attach; }
87 DtMailMessageHandle msgno() { return _msgno; }
88 RoamMenuWindow *parent() { return _parent; };
89 void attachmentFeedback(Boolean);
92 void msgno( DtMailMessageHandle msg_num ) { _msgno=msg_num; }
93 void append(const char *, const unsigned long);
94 void text(const char *, const unsigned long);
99 // SR - Added methods below
102 DtMailEditor* get_editor();
104 DtMailGenDialog *genDialog() { return _genDialog; }
106 void auto_show_cursor_off();
107 void auto_show_cursor_restore();
110 // SR - Text-selection callbacks.
112 virtual void text_selected();
113 virtual void text_unselected();
115 void attachment_selected();
116 void all_attachments_deselected();
117 void all_attachments_selected();
118 void selectAllAttachments();
119 void add_att(char *) { ; }
120 void add_att(char *, DtMailBuffer) { ; }
121 void add_att(DtMailBuffer) { ; }
123 void save_selected_attachment(char *);
125 void showAttachArea();
126 void hideAttachArea();
128 void activate_default_attach_menu();
129 void deactivate_default_attach_menu();
131 void addAttachmentActions(
135 void removeAttachmentActions();
136 void invokeAttachmentAction(int);
138 virtual void manage();
140 static void save_attachment_callback( void *, char *);
144 void createMenuPanes();
145 Widget createWorkArea( Widget );
147 void construct_edit_menu();
148 void construct_attachment_menu();
149 void construct_attachment_popup(void);
150 void construct_text_popup(void);
151 void construct_help_menu();
155 RoamMenuWindow *_parent;
160 DtMailGenDialog *_genDialog;
163 Cmd* _edit_select_all;
166 Widget _attachmentMenu;
167 CmdList *_attachmentActionsList;
168 CmdList *_attachmentMenuList;
169 CmdList *_attachmentPopupMenuList;
170 CmdList *_textPopupMenuList;
171 Cmd* _attach_save_as;
172 Cmd* _attach_select_all;
183 DtMailEditor *my_editor;
184 DtMailMessageHandle _msgno;