17a84e134Smrg/* 27a84e134Smrg * 37a84e134SmrgCopyright 1989, 1994, 1998 The Open Group 47a84e134Smrg 57a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its 67a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that 77a84e134Smrgthe above copyright notice appear in all copies and that both that 87a84e134Smrgcopyright notice and this permission notice appear in supporting 97a84e134Smrgdocumentation. 107a84e134Smrg 117a84e134SmrgThe above copyright notice and this permission notice shall be included in 127a84e134Smrgall copies or substantial portions of the Software. 137a84e134Smrg 147a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 157a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 167a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 177a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 187a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 197a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 207a84e134Smrg 217a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be 227a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings 237a84e134Smrgin this Software without prior written authorization from The Open Group. 247a84e134Smrg */ 257a84e134Smrg 267a84e134Smrg/* 277a84e134Smrg * ToggleP.h - Private definitions for Toggle widget 287a84e134Smrg * 297a84e134Smrg * Author: Chris D. Peterson 307a84e134Smrg * MIT X Consortium 317a84e134Smrg * kit@expo.lcs.mit.edu 32421c997bSmrg * 337a84e134Smrg * Date: January 12, 1989 347a84e134Smrg */ 357a84e134Smrg 367a84e134Smrg#ifndef _XawToggle_h 377a84e134Smrg#define _XawToggle_h 387a84e134Smrg 397a84e134Smrg#include <X11/Xaw/Command.h> 407a84e134Smrg 417a84e134Smrg/* Resources: 427a84e134Smrg 437a84e134Smrg Name Class RepType Default Value 447a84e134Smrg ---- ----- ------- ------------- 457a84e134Smrg radioGroup RadioGroup Widget NULL + 467a84e134Smrg radioData RadioData Pointer (XPointer) Widget ++ 477a84e134Smrg state State Boolean Off 487a84e134Smrg 497a84e134Smrg background Background Pixel XtDefaultBackground 507a84e134Smrg bitmap Pixmap Pixmap None 517a84e134Smrg border BorderColor Pixel XtDefaultForeground 527a84e134Smrg borderWidth BorderWidth Dimension 1 537a84e134Smrg callback Callback Pointer NULL 547a84e134Smrg cursor Cursor Cursor None 557a84e134Smrg destroyCallback Callback Pointer NULL 567a84e134Smrg displayList DisplayList XawDisplayList* NULL 577a84e134Smrg font Font XFontStructx* XtDefaultFont 587a84e134Smrg foreground Foreground Pixel XtDefaultForeground 597a84e134Smrg height Height Dimension text height 607a84e134Smrg highlightThickness Thickness Dimension 2 617a84e134Smrg insensitiveBorder Insensitive Pixmap Gray 627a84e134Smrg internalHeight Height Dimension 2 637a84e134Smrg internalWidth Width Dimension 4 647a84e134Smrg justify Justify XtJustify XtJustifyCenter 657a84e134Smrg label Label String NULL 667a84e134Smrg mappedWhenManaged MappedWhenManaged Boolean True 677a84e134Smrg resize Resize Boolean True 687a84e134Smrg sensitive Sensitive Boolean True 697a84e134Smrg width Width Dimension text width 707a84e134Smrg x Position Position 0 717a84e134Smrg y Position Position 0 727a84e134Smrg 737a84e134Smrg+ To use the toggle as a radio toggle button, set this resource to point to 747a84e134Smrg any other widget in the radio group. 757a84e134Smrg 767a84e134Smrg++ This is the data returned from a call to XtToggleGetCurrent, by default 777a84e134Smrg this is set to the name of toggle widget. 787a84e134Smrg 797a84e134Smrg*/ 807a84e134Smrg 817a84e134Smrg/* 827a84e134Smrg * These should be in StringDefs.h but aren't so we will define 837a84e134Smrg * them here if they are needed 847a84e134Smrg */ 857a84e134Smrg#define XtCWidget "Widget" 867a84e134Smrg#define XtCState "State" 877a84e134Smrg#define XtCRadioGroup "RadioGroup" 887a84e134Smrg#define XtCRadioData "RadioData" 897a84e134Smrg 907a84e134Smrg#ifndef _XtStringDefs_h_ 917a84e134Smrg#define XtRWidget "Widget" 927a84e134Smrg#endif 937a84e134Smrg 947a84e134Smrg#define XtNstate "state" 957a84e134Smrg#define XtNradioGroup "radioGroup" 967a84e134Smrg#define XtNradioData "radioData" 977a84e134Smrg 987a84e134Smrgextern WidgetClass toggleWidgetClass; 997a84e134Smrg 1007a84e134Smrgtypedef struct _ToggleClassRec *ToggleWidgetClass; 1017a84e134Smrgtypedef struct _ToggleRec *ToggleWidget; 1027a84e134Smrg 1037a84e134Smrg/* 1047a84e134Smrg * Public Functions 1057a84e134Smrg */ 1067a84e134Smrg 1077a84e134Smrg_XFUNCPROTOBEGIN 108421c997bSmrg 1097a84e134Smrg/* 1107a84e134Smrg * Function: 1117a84e134Smrg * XawToggleChangeRadioGroup 1127a84e134Smrg * 1137a84e134Smrg * Parameters: 1147a84e134Smrg * w - toggle widget to change lists 1157a84e134Smrg * radio_group - any widget in the new list 1167a84e134Smrg * 1177a84e134Smrg * Description: 1187a84e134Smrg * Allows a toggle widget to change radio lists. 1197a84e134Smrg */ 1207a84e134Smrgvoid XawToggleChangeRadioGroup 1217a84e134Smrg( 1227a84e134Smrg Widget w, 1237a84e134Smrg Widget radio_group 1247a84e134Smrg ); 1257a84e134Smrg 1267a84e134Smrg/* 1277a84e134Smrg * Function: 1287a84e134Smrg * XawToggleGetCurrent 1297a84e134Smrg * 1307a84e134Smrg * Parameters: 1317a84e134Smrg * radio_group - any toggle widget in the toggle list 1327a84e134Smrg * 1337a84e134Smrg * Description: 1347a84e134Smrg * Returns the RadioData associated with the toggle 1357a84e134Smrg * widget that is currently active in a toggle list. 1367a84e134Smrg * Returns: 1377a84e134Smrg * The XtNradioData associated with the toggle widget 1387a84e134Smrg */ 1397a84e134Smrg 1407a84e134SmrgXtPointer XawToggleGetCurrent 1417a84e134Smrg( 1427a84e134Smrg Widget radio_group 1437a84e134Smrg ); 1447a84e134Smrg 1457a84e134Smrg/* 1467a84e134Smrg * Function: 1477a84e134Smrg * XawToggleSetCurrent 1487a84e134Smrg * 1497a84e134Smrg * Parameters: 1507a84e134Smrg * radio_group - any toggle widget in the toggle list 1517a84e134Smrg * radio_data - radio data of the toggle widget to set 1527a84e134Smrg * 1537a84e134Smrg * Description: 1547a84e134Smrg * Sets the Toggle widget associated with the radio_data specified. 1557a84e134Smrg */ 1567a84e134Smrgvoid XawToggleSetCurrent 1577a84e134Smrg( 1587a84e134Smrg Widget radio_group, 1597a84e134Smrg XtPointer radio_data 1607a84e134Smrg ); 1617a84e134Smrg 1627a84e134Smrg/* 1637a84e134Smrg * Function: 1647a84e134Smrg * XawToggleUnsetCurrent 1657a84e134Smrg * 1667a84e134Smrg * Parameters: 1677a84e134Smrg * radio_group - any toggle widget in the toggle list 1687a84e134Smrg * 1697a84e134Smrg * Description: 1707a84e134Smrg * Unsets all Toggles in the radio_group specified. 1717a84e134Smrg */ 1727a84e134Smrgvoid XawToggleUnsetCurrent 1737a84e134Smrg( 1747a84e134Smrg Widget radio_group 1757a84e134Smrg ); 1767a84e134Smrg 1777a84e134Smrg_XFUNCPROTOEND 1787a84e134Smrg 1797a84e134Smrg#endif /* _XawToggle_h */ 180