Use C++ linker
[oweals/cde.git] / cde / programs / dtwm / PanelS.c
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 librararies 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 /* static char rcsid[] = 
24         "$XConsortium: PanelS.c /main/4 1995/11/01 11:27:29 rswiston $";
25 */
26 /**---------------------------------------------------------------------
27 ***     
28 ***     file:           PanelS.c
29 ***
30 ***     project:        MotifPlus Widgets
31 ***
32 ***     description:    Source code for DtPanelShell class.
33 ***     
34 ***
35 ***                     (c) Copyright 1992 by Hewlett-Packard Company.
36 ***
37 ***
38 ***-------------------------------------------------------------------*/
39
40
41 /*-------------------------------------------------------------
42 **      Include Files
43 */
44
45 #include <Xm/XmP.h>
46
47 #include <X11/Xatom.h>
48 #include <X11/StringDefs.h>
49 #include <X11/Shell.h>
50 #include <X11/ShellP.h>
51 #include <Dt/DtStrDefs.h>
52
53 #include "PanelSP.h"
54
55
56 /********    Public Function Declarations    ********/
57
58 /********    End Public Function Declarations    ********/
59
60 /********    Static Function Declarations    ********/
61
62
63 /********    End Static Function Declarations    ********/
64
65
66 \f
67 /*-------------------------------------------------------------
68 **      Resource List
69 */
70 #define R_Offset(field) \
71         XtOffset (DtPanelShellWidget, panel.field)
72
73 static XtResource panelResources[]=
74     {
75         {
76         XmNresolution,
77         XmCDimension, XmRDimension, sizeof (Dimension),
78         R_Offset (resolution), XmRImmediate, (XtPointer) 0
79         },
80         {
81         XmNhighResFontList,
82         XmCHighResFontList, XmRFontList, sizeof (XmFontList),
83         R_Offset (high_res_font_list), XmRString, (XtPointer) "fixed"
84         },
85         {
86         XmNmediumResFontList,
87         XmCMediumResFontList, XmRFontList, sizeof (XmFontList),
88         R_Offset (medium_res_font_list), XmRString, (XtPointer) "fixed"
89         },
90         {
91         XmNlowResFontList,
92         XmCLowResFontList, XmRFontList, sizeof (XmFontList),
93         R_Offset (low_res_font_list), XmRString, (XtPointer) "fixed"
94         }
95     };
96
97
98 \f
99 /*-------------------------------------------------------------
100 **      Class Record
101 */
102
103 static CompositeClassExtensionRec compositeClassExtension =
104     {
105     /* next_extension   */      NULL,
106     /* record_type      */      NULLQUARK,
107     /* version          */      XtCompositeExtensionVersion,
108     /* record_size      */      sizeof(CompositeClassExtensionRec),
109     /* accepts_objects  */      TRUE
110     };
111
112 DtPanelShellClassRec dtPanelShellClassRec =
113   {
114 /*      Core Part
115  */
116     {
117     /* superclass         */    (WidgetClass) &topLevelShellClassRec,
118     /* class_name         */    "FrontPanel",
119     /* size               */    sizeof(DtPanelShellRec),
120     /* Class Initializer  */    NULL,
121     /* class_part_initialize*/  NULL,
122     /* Class init'ed ?    */    FALSE,
123     /* initialize         */    NULL,
124     /* initialize_notify  */    NULL,           
125     /* realize            */    XtInheritRealize,
126     /* actions            */    NULL,
127     /* num_actions        */    0,
128     /* resources          */    panelResources,
129     /* resource_count     */    XtNumber(panelResources),
130     /* xrm_class          */    NULLQUARK,
131     /* compress_motion    */    FALSE,
132     /* compress_exposure  */    XtExposeCompressMaximal,
133     /* compress_enterleave*/    FALSE,
134     /* visible_interest   */    FALSE,
135     /* destroy            */    NULL,
136     /* resize             */    XtInheritResize,
137     /* expose             */    NULL,
138     /* set_values         */    NULL,
139     /* set_values_hook    */    NULL,                   
140     /* set_values_almost  */    XtInheritSetValuesAlmost,
141     /* get_values_hook    */    NULL,                   
142     /* accept_focus       */    NULL,
143     /* intrinsics version */    XtVersion,
144     /* callback offsets   */    NULL,
145     /* tm_table           */    XtInheritTranslations,
146     /* query_geometry     */    NULL,
147     /* display_accelerator*/    NULL,
148     /* extension          */    NULL
149     },
150 /*      Composite Part
151  */
152     {
153     /* geometry_manager   */    XtInheritGeometryManager,
154     /* change_managed     */    XtInheritChangeManaged,
155     /* insert_child       */    XtInheritInsertChild,
156     /* delete_child       */    XtInheritDeleteChild,
157     /* extension          */    (XtPointer)&compositeClassExtension
158     },
159 /*      Constraint Part
160  */
161     {
162     /* extension          */    NULL
163     },
164     {
165     /* extension          */    NULL
166     },
167     {
168     /* extension          */    NULL
169     },
170     {
171     /* extension          */    NULL
172     }
173   };
174
175 WidgetClass dtPanelShellWidgetClass = (WidgetClass) &dtPanelShellClassRec;
176
177
178 \f
179 /*-------------------------------------------------------------
180 **      Private Procs
181 **-------------------------------------------------------------
182 */
183
184
185 /*-------------------------------------------------------------
186 **      Core Procs
187 **-------------------------------------------------------------
188 */
189