rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libXaw4 / src / Xaw3_1Toggle.h
blob9237c168ac191fc4c86bbf43b4ec6cb55e5ff75c
1 /*
2 * $XConsortium: Toggle.h,v 1.7 89/12/11 15:23:02 kit Exp $
4 * Copyright 1989 Massachusetts Institute of Technology
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of M.I.T. not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. M.I.T. makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
16 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
18 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 * ToggleP.h - Private definitions for Toggle widget
27 * Author: Chris D. Peterson
28 * MIT X Consortium
29 * kit@expo.lcs.mit.edu
31 * Date: January 12, 1989
34 #ifndef _XawToggle_h
35 #define _XawToggle_h
37 /***********************************************************************
39 * Toggle Widget
41 ***********************************************************************/
43 #include <./Xaw3_1Command.h>
45 /* Resources:
47 Name Class RepType Default Value
48 ---- ----- ------- -------------
49 radioGroup RadioGroup Widget NULL +
50 radioData RadioData Pointer (caddr_t) Widget ++
51 state State Boolean Off
53 background Background Pixel XtDefaultBackground
54 bitmap Pixmap Pixmap None
55 border BorderColor Pixel XtDefaultForeground
56 borderWidth BorderWidth Dimension 1
57 callback Callback Pointer NULL
58 cursor Cursor Cursor None
59 destroyCallback Callback Pointer NULL
60 font Font XFontStructx* XtDefaultFont
61 foreground Foreground Pixel XtDefaultForeground
62 height Height Dimension text height
63 highlightThickness Thickness Dimension 2
64 insensitiveBorder Insensitive Pixmap Gray
65 internalHeight Height Dimension 2
66 internalWidth Width Dimension 4
67 justify Justify XtJustify XtJustifyCenter
68 label Label String NULL
69 mappedWhenManaged MappedWhenManaged Boolean True
70 resize Resize Boolean True
71 sensitive Sensitive Boolean True
72 width Width Dimension text width
73 x Position Position 0
74 y Position Position 0
76 + To use the toggle as a radio toggle button, set this resource to point to
77 any other widget in the radio group.
79 ++ This is the data returned from a call to XtToggleGetCurrent, by default
80 this is set to the name of toggle widget.
85 * These should be in StringDefs.h but aren't so we will define
86 * them here if they are needed.
90 #define XtCWidget "Widget"
91 #define XtCState "State"
92 #define XtCRadioGroup "RadioGroup"
93 #define XtCRadioData "RadioData"
95 #define XtRWidget "Widget"
97 #define XtNstate "state"
98 #define XtNradioGroup "radioGroup"
99 #define XtNradioData "radioData"
101 extern WidgetClass toggleWidgetClass;
103 typedef struct _ToggleClassRec *ToggleWidgetClass;
104 typedef struct _ToggleRec *ToggleWidget;
107 /************************************************************
109 * Public Functions
111 ************************************************************/
113 /* Function Name: XawToggleChangeRadioGroup
114 * Description: Allows a toggle widget to change radio lists.
115 * Arguments: w - The toggle widget to change lists.
116 * radio_group - any widget in the new list.
117 * Returns: none.
120 void XawToggleChangeRadioGroup(/* w, radio_group */);
121 /* Widget w, radio_group; */
123 /* Function Name: XawToggleGetCurrent
124 * Description: Returns the RadioData associated with the toggle
125 * widget that is currently active in a toggle list.
126 * Arguments: radio_group - any toggle widget in the toggle list.
127 * Returns: The XtNradioData associated with the toggle widget.
130 caddr_t XawToggleGetCurrent(/* radio_group */);
131 /* Widget radio_group; */
133 /* Function Name: XawToggleSetCurrent
134 * Description: Sets the Toggle widget associated with the
135 * radio_data specified.
136 * Arguments: radio_group - any toggle widget in the toggle list.
137 * radio_data - radio data of the toggle widget to set.
138 * Returns: none.
141 void XawToggleSetCurrent(/* radio_group, radio_data */);
142 /* Widget radio_group;
143 * caddr_t radio_data;
146 /* Function Name: XawToggleUnsetCurrent
147 * Description: Unsets all Toggles in the radio_group specified.
148 * Arguments: radio_group - any toggle widget in the toggle list.
149 * Returns: none.
152 void XawToggleUnsetCurrent( /* radio_group */);
153 /* Widget radio_group; */
155 #ifdef XAW_BC
156 /*************************************************************
157 * For Compatibility only. */
159 #define XtToggleChangeRadioGroup XawToggleChangeRadioGroup
160 #define XtToggleSetCurrent XawToggleSetCurrent
161 #define XtToggleUnsetCurrent XawToggleUnsetCurrent
162 #define XtToggleGetCurrent XawToggleGetCurrent
164 /*************************************************************/
165 #endif /* XAW_BC */
167 #endif /* _XawToggle_h */
168 /* DON'T ADD STUFF AFTER THIS */