comparison lwlib/xlwcheckbox.c @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents 5460287a3327
children 308d34e9f07d
comparison
equal deleted inserted replaced
5117:3742ea8250b5 5118:e0db3c197671
37 #include <stdio.h> 37 #include <stdio.h>
38 38
39 #include <X11/IntrinsicP.h> 39 #include <X11/IntrinsicP.h>
40 #include <X11/StringDefs.h> 40 #include <X11/StringDefs.h>
41 #include ATHENA_XawInit_h_ 41 #include ATHENA_XawInit_h_
42 #include "../src/xmu.h" 42 #include "xt-wrappers.h"
43 #include "xlwcheckboxP.h" 43 #include "xlwcheckboxP.h"
44 44
45 45
46 /* by using the same size for the checkbox as for the diamond box, 46 /* by using the same size for the checkbox as for the diamond box,
47 * we can let the Radio widget do the vast majority of the work. 47 * we can let the Radio widget do the vast majority of the work.
87 <Btn1Down>,<Btn1Up>: unpress(nodraw) toggle() notify()"; 87 <Btn1Down>,<Btn1Up>: unpress(nodraw) toggle() notify()";
88 #endif 88 #endif
89 89
90 90
91 91
92 #define offset(field) XtOffsetOf(CheckboxRec, field) 92 #define offset(field) XtOffsetOf(CheckboxRec, checkbox.field)
93 #define res(name,_class,intrepr,type,member,extrepr,value) \
94 Xt_RESOURCE (name, _class, intrepr, type, offset(member), extrepr, value)
93 static XtResource resources[] = { 95 static XtResource resources[] = {
94 {XtNtristate, XtCTristate, XtRBoolean, sizeof(Boolean), 96 res (XtNtristate, XtCTristate, XtRBoolean, Boolean, tristate,
95 offset(checkbox.tristate), XtRImmediate, (XtPointer)FALSE}, 97 XtRImmediate, FALSE),
96 } ; 98 } ;
97 #undef offset 99 #undef offset
98 100
99 /* Member functions */ 101 /* Member functions */
100 102
125 #define SuperClass ((RadioWidgetClass)&radioClassRec) 127 #define SuperClass ((RadioWidgetClass)&radioClassRec)
126 128
127 CheckboxClassRec checkboxClassRec = { 129 CheckboxClassRec checkboxClassRec = {
128 { 130 {
129 (WidgetClass) SuperClass, /* superclass */ 131 (WidgetClass) SuperClass, /* superclass */
130 "Checkbox", /* class_name */ 132 (String) "Checkbox", /* class_name */
131 sizeof(CheckboxRec), /* size */ 133 sizeof(CheckboxRec), /* size */
132 CheckboxClassInit, /* class_initialize */ 134 CheckboxClassInit, /* class_initialize */
133 NULL, /* class_part_initialize */ 135 NULL, /* class_part_initialize */
134 FALSE, /* class_inited */ 136 FALSE, /* class_inited */
135 CheckboxInit, /* initialize */ 137 CheckboxInit, /* initialize */