lldpd: update to 1.0.19
[oi-userland.git] / components / x11 / libXaw5 / src / Toggle.h
blob334fcfcbf0fd619efcb6fe82761adc6d8a8f9417
1 /*
2 * $XConsortium: Toggle.h,v 1.16 94/04/17 20:13:19 kaleb Exp $
4 Copyright (c) 1989, 1994 X Consortium
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of the X Consortium shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from the X Consortium.
29 * ToggleP.h - Private definitions for Toggle widget
31 * Author: Chris D. Peterson
32 * MIT X Consortium
33 * kit@expo.lcs.mit.edu
35 * Date: January 12, 1989
38 #ifndef _XawToggle_h
39 #define _XawToggle_h
41 /***********************************************************************
43 * Toggle Widget
45 ***********************************************************************/
47 #include <X11/Xaw/Command.h>
49 /* Resources:
51 Name Class RepType Default Value
52 ---- ----- ------- -------------
53 radioGroup RadioGroup Widget NULL +
54 radioData RadioData Pointer (XPointer) Widget ++
55 state State Boolean Off
57 background Background Pixel XtDefaultBackground
58 bitmap Pixmap Pixmap None
59 border BorderColor Pixel XtDefaultForeground
60 borderWidth BorderWidth Dimension 1
61 callback Callback Pointer NULL
62 cursor Cursor Cursor None
63 destroyCallback Callback Pointer NULL
64 font Font XFontStructx* XtDefaultFont
65 foreground Foreground Pixel XtDefaultForeground
66 height Height Dimension text height
67 highlightThickness Thickness Dimension 2
68 insensitiveBorder Insensitive Pixmap Gray
69 internalHeight Height Dimension 2
70 internalWidth Width Dimension 4
71 justify Justify XtJustify XtJustifyCenter
72 label Label String NULL
73 mappedWhenManaged MappedWhenManaged Boolean True
74 resize Resize Boolean True
75 sensitive Sensitive Boolean True
76 width Width Dimension text width
77 x Position Position 0
78 y Position Position 0
80 + To use the toggle as a radio toggle button, set this resource to point to
81 any other widget in the radio group.
83 ++ This is the data returned from a call to XtToggleGetCurrent, by default
84 this is set to the name of toggle widget.
89 * These should be in StringDefs.h but aren't so we will define
90 * them here if they are needed.
94 #define XtCWidget "Widget"
95 #define XtCState "State"
96 #define XtCRadioGroup "RadioGroup"
97 #define XtCRadioData "RadioData"
99 #ifndef _XtStringDefs_h_
100 #define XtRWidget "Widget"
101 #endif
103 #define XtNstate "state"
104 #define XtNradioGroup "radioGroup"
105 #define XtNradioData "radioData"
107 extern WidgetClass toggleWidgetClass;
109 typedef struct _ToggleClassRec *ToggleWidgetClass;
110 typedef struct _ToggleRec *ToggleWidget;
113 /************************************************************
115 * Public Functions
117 ************************************************************/
119 _XFUNCPROTOBEGIN
121 /* Function Name: XawToggleChangeRadioGroup
122 * Description: Allows a toggle widget to change radio lists.
123 * Arguments: w - The toggle widget to change lists.
124 * radio_group - any widget in the new list.
125 * Returns: none.
128 extern void XawToggleChangeRadioGroup(
129 #if NeedFunctionPrototypes
130 Widget /* w */,
131 Widget /* radio_group */
132 #endif
135 /* Function Name: XawToggleGetCurrent
136 * Description: Returns the RadioData associated with the toggle
137 * widget that is currently active in a toggle list.
138 * Arguments: radio_group - any toggle widget in the toggle list.
139 * Returns: The XtNradioData associated with the toggle widget.
142 extern XtPointer XawToggleGetCurrent(
143 #if NeedFunctionPrototypes
144 Widget /* radio_group */
145 #endif
148 /* Function Name: XawToggleSetCurrent
149 * Description: Sets the Toggle widget associated with the
150 * radio_data specified.
151 * Arguments: radio_group - any toggle widget in the toggle list.
152 * radio_data - radio data of the toggle widget to set.
153 * Returns: none.
156 extern void XawToggleSetCurrent(
157 #if NeedFunctionPrototypes
158 Widget /* radio_group */,
159 XtPointer /* radio_data */
160 #endif
163 /* Function Name: XawToggleUnsetCurrent
164 * Description: Unsets all Toggles in the radio_group specified.
165 * Arguments: radio_group - any toggle widget in the toggle list.
166 * Returns: none.
169 extern void XawToggleUnsetCurrent(
170 #if NeedFunctionPrototypes
171 Widget /* radio_group */
172 #endif
175 _XFUNCPROTOEND
177 #endif /* _XawToggle_h */