-fpermissive to allow GCC to compile old C++
[oweals/cde.git] / cde / programs / dtmail / dtmail / Undelete.hh
1 /*
2  *+SNOTICE
3  *
4  *      $TOG: Undelete.hh /main/6 1998/09/02 15:58:26 mgreess $
5  *
6  *      RESTRICTED CONFIDENTIAL INFORMATION:
7  *
8  *      The information in this document is subject to special
9  *      restrictions in a confidential disclosure agreement between
10  *      HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
11  *      document outside HP, IBM, Sun, USL, SCO, or Univel without
12  *      Sun's specific written approval.  This document and all copies
13  *      and derivative works thereof must be returned or destroyed at
14  *      Sun's request.
15  *
16  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
17  *
18  *+ENOTICE
19  */
20
21 #ifndef _UNDELETE_HH
22 #define _UNDELETE_HH
23
24 #include "DialogShell.h"
25 #include "MsgScrollingList.hh"
26 #include "CmdList.h"
27
28 /* UNDEL_*      msgid 600 - 699
29  */
30 #define UNDEL_SENDER  600
31 #define UNDEL_SUB     601
32 #define UNDEL_DATE    602
33 #define UNDEL_SIZE    603
34 #define UNDEL_UNDEL   604
35 #define UNDEL_CLOSE   605
36 #define UNDEL_EXIT    606
37 #define UNDEL_OKBUT   607
38 #define UNDEL_DLGTTL  608
39
40 class RoamMenuWindow;
41
42 class UndelMsgScrollingList : public MsgScrollingList {
43   public:
44     UndelMsgScrollingList ( RoamMenuWindow *, Widget, char * );
45     ~UndelMsgScrollingList ();
46     void extended_selection(DtMailEnv &, int);
47     void insertMsg(DtMailMessageHandle);
48     void insertMsg(DtMailEnv &, MsgStruct *);
49     void loadMsgs(DtMailEnv &, MsgHndArray *, int);
50
51     virtual void deleteSelected(Boolean silent = TRUE);
52 };
53
54
55 class UndelFromListDialog : public DialogShell {
56   public:
57     UndelFromListDialog (char *, RoamMenuWindow *);
58     ~UndelFromListDialog();
59     Widget  createWorkArea(Widget);
60     virtual void initialize();
61     virtual void quit();
62
63
64         // Accessors
65         // Mutators
66     void popped_down();
67     void popped_up();
68     void insertMsg(DtMailEnv &, MsgStruct *);
69     void loadMsgs(DtMailEnv &, MsgHndArray *, int);
70
71     void undelSelected();
72     void undelLast();
73     UndelMsgScrollingList *undelList() { return _list; }
74     void addToRowOfButtons();
75
76     void expunge(void);
77
78     void replaceItems(XmString * items, int num_items) {
79         if (_list) {
80             XmListReplaceItemsPos(_list->get_scrolling_list(), items, num_items, 1);
81         }
82     }
83
84   protected:
85     Cmd *_undelete_button;
86     Cmd *_close_button;
87   private:
88     UndelMsgScrollingList *_list;
89     Widget *_undel_list_button;
90     Widget rowOfLabels, rowOfButtons;
91     Widget rowOfMessageStatus;
92     RoamMenuWindow *my_owner;
93 };
94
95
96
97 #endif