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 libraries 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: DtMailEditor.hh /main/5 1997/06/06 12:45:31 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 DTMAILEDITOR_H
44 #define DTMAILEDITOR_H
48 #include "AttachArea.h"
51 class DtMailEditor : public UIComponent {
57 AbstractEditorParent *
59 virtual ~DtMailEditor();
62 AbstractEditorParent *owner();
65 AttachArea *attachArea();
69 void showAttachArea();
70 void hideAttachArea();
71 void manageAttachArea();
72 void unmanageAttachArea();
73 void setMsgHnd( DtMail::Message *);
74 static void attachTransferCallback(Widget, XtPointer, XtPointer );
75 void attachDropRegister();
76 void attachDropEnable();
77 void attachDropDisable();
78 static void attachConvertCallback(Widget, XtPointer, XtPointer);
79 static void attachDragFinishCallback(Widget, XtPointer, XtPointer);
80 void attachDragStart(Widget, XEvent *);
81 void attachDragMotionHandler(Widget, XEvent *);
82 //void attachDragSetup();
83 void setEditable(Boolean);
84 Boolean editable() { return _editable; }
85 Boolean doingDrag() { return _doingDrag; }
86 void setDoingDrag(Boolean doingDrag) { _doingDrag = doingDrag; }
87 void setDragX(int n) { _dragX = n; }
88 void setDragY(int n) { _dragY = n; }
89 int dragX() { return _dragX; }
90 int dragY() { return _dragY; }
92 // Routines to null terminate buffer.
93 void needBuf(char **, unsigned long *, unsigned long len);
94 void stripCRLF(char **, const char * buf, const unsigned long len);
98 DtMail::Message *_msgHandle;
99 Editor *_myTextEditor;
100 AttachArea *_myAttachArea;
105 Boolean _showAttachArea;
110 // Can be RMW or VMD or SMD
111 AbstractEditorParent *_myOwner;
115 #endif // DTMAILEDITOR_HH