Debian Codegraph @

texk/xdvik/gui/xlwradioP.h

raw
1 /* adapted from xlwradio.c in the XEmacs distribution.
2 Changes are Copyright (C) 2002-2004 the xdvik development team
3 Original copyright follows:
4 */
5
6 /* Radio Widget for XEmacs.
7 Copyright (C) 1999 Edward A. Falk
8
9 This file is part of XEmacs.
10
11 XEmacs is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2, or (at your option) any
14 later version.
15
16 XEmacs is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with XEmacs; see the file COPYING. If not, write to
23 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. */
25
26 /*
27 * RadioP.h - Private definitions for Radio widget
28 *
29 * Author: Edward A. Falk
30 * [email protected]
31 *
32 * Date: June 30, 1997
33 *
34 */
35
36 #ifndef _XawRadioP_h
37 #define _XawRadioP_h
38
39 #include "xlwradio.h"
40
41 #ifndef MOTIF
42
43 #include <X11/IntrinsicP.h>
44 #include <X11/StringDefs.h>
45 #include <X11/Intrinsic.h>
46 #include <X11/StringDefs.h>
47 #include <X11/Xos.h>
48 #include <X11/Xaw/Text.h>
49 #include <X11/Xaw/AsciiText.h>
50
51 #include <X11/Xaw/ToggleP.h>
52 #include <X11/Xaw/XawInit.h>
53
54 /***********************************************************************
55 *
56 * Radio Widget Private Data
57 *
58 ***********************************************************************/
59
60 typedef void (*XawDiamondProc) (Widget);
61
62 void RadioSet (Widget w,
63 XEvent *event,
64 String *params, /* unused */
65 Cardinal *num_params); /* unused */
66
67 void RadioUnset (Widget w,
68 XEvent *event,
69 String *params, /* unused */
70 Cardinal *num_params); /* unused */
71
72 /************************************
73 *
74 * Class structure
75 *
76 ***********************************/
77
78 /* New fields for the Radio widget class record */
79 typedef struct _RadioClass {
80 Dimension dsize; /* diamond size */
81 XawDiamondProc drawDiamond;
82 /* pixmaps for the button */
83 Pixmap sel_radio; /* selected state */
84 Pixmap unsel_radio; /* unselected state */
85 Pixmap sel_menu; /* selected state */
86 Pixmap unsel_menu; /* unselected state */
87 /* TODO: 3-d and xaw-xpm features? */
88 XtPointer extension;
89 } RadioClassPart;
90
91 #define XtInheritDrawDiamond ((XawDiamondProc)_XtInherit)
92
93 /* Full class record declaration */
94 typedef struct _RadioClassRec {
95 CoreClassPart core_class;
96 SimpleClassPart simple_class;
97 #ifdef _ThreeDP_h
98 ThreeDClassPart threeD_class;
99 #endif
100 LabelClassPart label_class;
101 CommandClassPart command_class;
102 ToggleClassPart toggle_class;
103 RadioClassPart radio_class;
104 } RadioClassRec;
105
106 extern RadioClassRec radioClassRec;
107
108 /***************************************
109 *
110 * Instance (widget) structure
111 *
112 **************************************/
113
114 /* New fields for the Radio widget record */
115 typedef struct {
116 /* resources */
117 Boolean isRadio; /* radio if True, checkbox else */
118 /* TODO: 3-d and xaw-xpm features? */
119
120 /* private data */
121 XtPointer extension;
122 } RadioPart;
123
124 /* Full widget declaration */
125 typedef struct _RadioRec {
126 CorePart core;
127 SimplePart simple;
128 #ifdef _ThreeDP_h
129 ThreeDPart threeD;
130 #endif
131 LabelPart label;
132 CommandPart command;
133 TogglePart toggle;
134 RadioPart radio;
135 } RadioRec;
136
137 #endif /* MOTIF */
138
139 #endif /* _XawRadioP_h */