Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / programs / dtmail / dtmail / DtMailEditor.hh
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /*
24  *+SNOTICE
25  *
26  *      $TOG: DtMailEditor.hh /main/5 1997/06/06 12:45:31 mgreess $
27  *
28  *      RESTRICTED CONFIDENTIAL INFORMATION:
29  *      
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
36  *      Sun's request.
37  *
38  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
39  *
40  *+ENOTICE
41  */
42
43 #ifndef DTMAILEDITOR_H
44 #define DTMAILEDITOR_H
45
46 #include <Xm/Xm.h>
47 #include "Editor.hh"
48 #include "AttachArea.h"
49
50
51 class DtMailEditor : public UIComponent {
52
53   public:       
54
55     DtMailEditor(
56                 Widget,
57                 AbstractEditorParent *
58                 );
59     virtual ~DtMailEditor();
60
61     void        initialize();
62     AbstractEditorParent *owner(); 
63     
64     Editor      *textEditor();
65     AttachArea  *attachArea();
66
67     Widget      container();
68
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; }
91
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);
95
96   private:
97
98     DtMail::Message *_msgHandle;
99     Editor      *_myTextEditor;
100     AttachArea  *_myAttachArea;
101     Widget      _container;
102     Widget      _separator;
103
104     Boolean     _editable;
105     Boolean     _showAttachArea;
106     Boolean     _doingDrag;
107     int         _dragX;
108     int         _dragY;
109
110         // Can be RMW or VMD or SMD
111     AbstractEditorParent *_myOwner;     
112
113 };
114
115 #endif // DTMAILEDITOR_HH