-fpermissive to allow GCC to compile old C++
[oweals/cde.git] / cde / programs / dtmail / dtmail / DtMailDialogCallbackData.hh
1 /*
2  *+SNOTICE
3  *
4  *      $XConsortium: DtMailDialogCallbackData.hh /main/4 1996/04/21 19:41:35 drk $
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 ///////////////////////////////////////////////////////////////////////////////
22 //////////////////////////////////////////////////////////////////////////////
23 //         This example code is from the book:
24 //
25 //           Object-Oriented Programming with C++ and OSF/Motif
26 //         by
27 //           Douglas Young
28 //           Prentice Hall, 1992
29 //           ISBN 0-13-630252-1 
30 //
31 //         Copyright 1991 by Prentice Hall
32 //         All Rights Reserved
33 //
34 //  Permission to use, copy, modify, and distribute this software for 
35 //  any purpose except publication and without fee is hereby granted, provided 
36 //  that the above copyright notice appear in all copies of the software.
37 ///////////////////////////////////////////////////////////////////////////////
38 //////////////////////////////////////////////////////////////////////////////
39
40
41 ////////////////////////////////////////////////////////////////
42 // DtMailDialogCallbackData.h: Auxiliary class used by DtMailGenDialog
43 //////////////////////////////////////////////////////////////
44 #ifndef DTMAILDIALOGCALLBACKDATA
45 #define DTMAILDIALOGCALLBACKDATA
46
47 class DtMailGenDialog;
48
49 typedef void (*DialogCallback)( void * );
50
51 class DtMailDialogCallbackData {
52
53   private:
54     
55     DtMailGenDialog  *_dialog;
56     DialogCallback  _ok;
57     DialogCallback  _help;
58     DialogCallback  _cancel;
59     DialogCallback  _other;
60     void           *_clientData;
61     Widget          _other_w;
62     
63   public:
64     
65     DtMailDialogCallbackData ( DtMailGenDialog *dialog, 
66                         void          *clientData,
67                         DialogCallback ok,
68                         DialogCallback cancel,
69                         DialogCallback other,
70                         DialogCallback help,
71                         Widget other_w)
72     {
73         _dialog = dialog;
74         _ok            = ok;
75         _help          = help;
76         _cancel        = cancel;
77         _other         = other;
78         _clientData    = clientData;
79         _other_w       = other_w;
80     }
81     
82     DtMailGenDialog  *dialog() { return _dialog; }
83     DialogCallback  ok() { return _ok; }
84     DialogCallback  help() { return _help; }
85     DialogCallback  cancel() { return _cancel; }
86     DialogCallback  other() { return _other; }
87     void           *clientData() { return _clientData; }
88     Widget         other_w() { return _other_w; }
89 };
90 #endif
91