Changeset 151 for trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html
- Timestamp:
- 08/09/06 12:21:11 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html
r138 r151 696 696 </div> 697 697 698 <div id="file_comments"></div> 698 <div id="file_comments"> 699 CW_BGROUP is a compound widget that simplifies creating 700 a base of buttons. It handles the details of creating the 701 proper base (standard, exclusive, or non-exclusive) and filling 702 in the desired buttons. Events for the individual buttons are 703 handled transparently, and a CW_BGROUP event returned. This 704 event can return any one of the following: 705 - The Index of the button within the base. 706 - The widget ID of the button. 707 - The name of the button. 708 - An arbitrary value taken from an array of User values. 709 </div> 699 710 700 711 … … 711 722 712 723 <dt><p><a href="#_CW_BGROUP_SETV">CW_BGROUP_SETV<span class="result">, id, value</span></a></p><dt> 713 <dd> NAME: CW_BGROUP PURPOSE: CW_BGROUP is a compound widget that simplifies creating a base of buttons.</dd>724 <dd></dd> 714 725 715 726 <dt><p><a href="#_CW_BGROUP_GETV"><span class="result">result = </span>CW_BGROUP_GETV(<span class="result">id, value</span>)</a></p><dt> … … 736 747 CW_BGROUP_SETV<span class="result">, <a href="#_CW_BGROUP_SETV_param_id">id</a>, <a href="#_CW_BGROUP_SETV_param_value">value</a></span></p> 737 748 738 <div class="comments"> 739 NAME: 740 CW_BGROUP 741 742 PURPOSE: 743 CW_BGROUP is a compound widget that simplifies creating 744 a base of buttons. It handles the details of creating the 745 proper base (standard, exclusive, or non-exclusive) and filling 746 in the desired buttons. Events for the individual buttons are 747 handled transparently, and a CW_BGROUP event returned. This 748 event can return any one of the following: 749 - The Index of the button within the base. 750 - The widget ID of the button. 751 - The name of the button. 752 - An arbitrary value taken from an array of User values. 753 754 CATEGORY: 755 Compound widgets. 756 757 CALLING SEQUENCE: 758 Widget = CW_BGROUP(Parent, Names) 759 760 To get or set the value of a CW_BGROUP, use the GET_VALUE and 761 SET_VALUE keywords to WIDGET_CONTROL. The value of a CW_BGROUP 762 is: 763 764 ----------------------------------------------- 765 Type Value 766 ----------------------------------------------- 767 normal None 768 exclusive Index of currently set button 769 non-exclusive Vector indicating the position 770 of each button (1-set, 0-unset) 771 ----------------------------------------------- 772 773 774 INPUTS: 775 Parent: The ID of the parent widget. 776 Names: A string array, containing one string per button, 777 giving the name of each button. 778 779 KEYWORD PARAMETERS: 780 781 BUTTON_UVALUE: An array of user values to be associated with 782 each button and returned in the event structure. 783 COLUMN: Buttons will be arranged in the number of columns 784 specified by this keyword. 785 EVENT_FUNCT: The name of an optional user-supplied event function 786 for buttons. This function is called with the return 787 value structure whenever a button is pressed, and 788 follows the conventions for user-written event 789 functions. 790 EXCLUSIVE: Buttons will be placed in an exclusive base, with 791 only one button allowed to be selected at a time. 792 FONT: The name of the font to be used for the button 793 titles. If this keyword is not specified, the default 794 font is used. 795 FRAME: Specifies the width of the frame to be drawn around 796 the base. 797 IDS: A named variable into which the button IDs will be 798 stored, as a longword vector. 799 LABEL_LEFT: Creates a text label to the left of the buttons. 800 LABEL_TOP: Creates a text label above the buttons. 801 MAP: If set, the base will be mapped when the widget 802 is realized (the default). 803 NONEXCLUSIVE: Buttons will be placed in an non-exclusive base. 804 The buttons will be independent. 805 NO_RELEASE: If set, button release events will not be returned. 806 RETURN_ID: If set, the VALUE field of returned events will be 807 the widget ID of the button. 808 RETURN_INDEX: If set, the VALUE field of returned events will be 809 the zero-based index of the button within the base. 810 THIS IS THE DEFAULT. 811 RETURN_NAME: If set, the VALUE field of returned events will be 812 the name of the button within the base. 813 ROW: Buttons will be arranged in the number of rows 814 specified by this keyword. 815 SCROLL: If set, the base will include scroll bars to allow 816 viewing a large base through a smaller viewport. 817 SET_VALUE: The initial value of the buttons. This is equivalent 818 to the later statement: 819 820 WIDGET_CONTROL, widget, set_value=value 821 822 SPACE: The space, in pixels, to be left around the edges 823 of a row or column major base. This keyword is 824 ignored if EXCLUSIVE or NONEXCLUSIVE are specified. 825 UVALUE: The user value to be associated with the widget. 826 UNAME: The user name to be associated with the widget. 827 XOFFSET: The X offset of the widget relative to its parent. 828 XPAD: The horizontal space, in pixels, between children 829 of a row or column major base. Ignored if EXCLUSIVE 830 or NONEXCLUSIVE are specified. 831 XSIZE: The width of the base. 832 X_SCROLL_SIZE: The width of the viewport if SCROLL is specified. 833 YOFFSET: The Y offset of the widget relative to its parent. 834 YPAD: The vertical space, in pixels, between children of 835 a row or column major base. Ignored if EXCLUSIVE 836 or NONEXCLUSIVE are specified. 837 YSIZE: The height of the base. 838 Y_SCROLL_SIZE: The height of the viewport if SCROLL is specified. 839 840 OUTPUTS: 841 The ID of the created widget is returned. 842 843 SIDE EFFECTS: 844 This widget generates event structures with the following definition: 845 846 event = { ID:0L, TOP:0L, HANDLER:0L, SELECT:0, VALUE:0 } 847 848 The SELECT field is passed through from the button event. VALUE is 849 either the INDEX, ID, NAME, or BUTTON_UVALUE of the button, 850 depending on how the widget was created. 851 852 RESTRICTIONS: 853 Only buttons with textual names are handled by this widget. 854 Bitmaps are not understood. 855 856 MODIFICATION HISTORY: 857 15 June 1992, AB 858 7 April 1993, AB, Removed state caching. 859 6 Oct. 1994, KDB, Font keyword is not applied to the label. 860 10 FEB 1995, DJC fixed bad bug in event procedure, getting 861 id of stash widget. 862 11 April 1995, AB Removed Motif special cases.</div> 749 <div class="comments"></div> 863 750 864 751 … … 1058 945 <div class="routine_details" id="_CW_BGROUP"> 1059 946 1060 <h2><a class="top" href="#container">top</a>CW_BGROUP </h2> 947 <h2><a class="top" href="#container">top</a>CW_BGROUP <span class="categories"> 948 Compound widgets. 949 </span></h2> 1061 950 1062 951 <p class="header"> … … 1065 954 <div class="comments"></div> 1066 955 1067 956 <h3>Return value</h3><div class="preformat"> 957 The ID of the created widget is returned. 958 </div> 1068 959 1069 960 … … 1072 963 1073 964 <h4 id="_CW_BGROUP_param_parent">parent 1074 1075 1076 1077 1078 1079 1080 1081 1082 </h4> 1083 1084 <div class="comments"></div> 965 <span class="attr">in</span> 966 967 968 <span class="attr">required</span> 969 970 971 972 973 </h4> 974 975 <div class="comments"> 976 The ID of the parent widget. 977 </div> 1085 978 1086 979 <h4 id="_CW_BGROUP_param_names">names … … 1095 988 </h4> 1096 989 1097 <div class="comments"></div> 990 <div class="comments"> 991 A string array, containing one string per button, 992 giving the name of each button. 993 </div> 1098 994 1099 995 … … 1115 1011 </h4> 1116 1012 1013 <div class="comments"> 1014 An array of user values to be associated with 1015 each button and returned in the event structure. 1016 </div> 1017 1018 <h4 id="_CW_BGROUP_keyword_COLUMN">COLUMN 1019 1020 1021 1022 1023 1024 1025 1026 1027 </h4> 1028 1029 <div class="comments"> 1030 Buttons will be arranged in the number of columns 1031 specified by this keyword. 1032 </div> 1033 1034 <h4 id="_CW_BGROUP_keyword_EVENT_FUNCT">EVENT_FUNCT 1035 1036 1037 1038 1039 1040 1041 1042 1043 </h4> 1044 1045 <div class="comments"> 1046 The name of an optional user-supplied event function 1047 for buttons. This function is called with the return 1048 value structure whenever a button is pressed, and 1049 follows the conventions for user-written event functions. 1050 </div> 1051 1052 <h4 id="_CW_BGROUP_keyword_EXCLUSIVE">EXCLUSIVE 1053 1054 1055 1056 1057 1058 1059 1060 1061 </h4> 1062 1063 <div class="comments"> 1064 Buttons will be placed in an exclusive base, with 1065 only one button allowed to be selected at a time. 1066 </div> 1067 1068 <h4 id="_CW_BGROUP_keyword_FONT">FONT 1069 1070 1071 1072 1073 1074 1075 1076 1077 </h4> 1078 1079 <div class="comments"> 1080 The name of the font to be used for the button 1081 titles. If this keyword is not specified, the default 1082 font is used. 1083 </div> 1084 1085 <h4 id="_CW_BGROUP_keyword_FRAME">FRAME 1086 1087 1088 1089 1090 1091 1092 1093 1094 </h4> 1095 1096 <div class="comments"> 1097 Specifies the width of the frame to be drawn around the base. 1098 </div> 1099 1100 <h4 id="_CW_BGROUP_keyword_IDS">IDS 1101 1102 1103 1104 1105 1106 1107 1108 1109 </h4> 1110 1111 <div class="comments"> 1112 A named variable into which the button IDs will be 1113 stored, as a longword vector. 1114 </div> 1115 1116 <h4 id="_CW_BGROUP_keyword_LABEL_TOP">LABEL_TOP 1117 1118 1119 1120 1121 1122 1123 1124 1125 </h4> 1126 1127 <div class="comments"> 1128 Creates a text label above the buttons. 1129 </div> 1130 1131 <h4 id="_CW_BGROUP_keyword_LABEL_LEFT">LABEL_LEFT 1132 1133 1134 1135 1136 1137 1138 1139 1140 </h4> 1141 1142 <div class="comments"> 1143 Creates a text label to the left of the buttons. 1144 </div> 1145 1146 <h4 id="_CW_BGROUP_keyword_MAP">MAP 1147 1148 1149 1150 1151 1152 1153 1154 1155 </h4> 1156 1157 <div class="comments"> 1158 If set, the base will be mapped when the widget 1159 is realized (the default). 1160 </div> 1161 1162 <h4 id="_CW_BGROUP_keyword_NONEXCLUSIVE">NONEXCLUSIVE 1163 1164 1165 1166 1167 1168 1169 1170 1171 </h4> 1172 1173 <div class="comments"> 1174 Buttons will be placed in an non-exclusive base. 1175 The buttons will be independent. 1176 </div> 1177 1178 <h4 id="_CW_BGROUP_keyword_NO_RELEASE">NO_RELEASE 1179 1180 1181 1182 1183 1184 1185 1186 1187 </h4> 1188 1189 <div class="comments"> 1190 If set, button release events will not be returned. 1191 </div> 1192 1193 <h4 id="_CW_BGROUP_keyword_RETURN_ID">RETURN_ID 1194 1195 1196 1197 1198 1199 1200 1201 1202 </h4> 1203 1204 <div class="comments"> 1205 If set, the VALUE field of returned events will be 1206 the widget ID of the button. 1207 </div> 1208 1209 <h4 id="_CW_BGROUP_keyword_RETURN_INDEX">RETURN_INDEX 1210 1211 1212 1213 1214 1215 1216 1217 1218 </h4> 1219 1220 <div class="comments"> 1221 If set, the VALUE field of returned events will be 1222 the zero-based index of the button within the base. 1223 THIS IS THE DEFAULT. 1224 </div> 1225 1226 <h4 id="_CW_BGROUP_keyword_RETURN_NAME">RETURN_NAME 1227 1228 1229 1230 1231 1232 1233 1234 1235 </h4> 1236 1237 <div class="comments"> 1238 If set, the VALUE field of returned events will be 1239 the name of the button within the base. 1240 </div> 1241 1242 <h4 id="_CW_BGROUP_keyword_ROW">ROW 1243 1244 1245 1246 1247 1248 1249 1250 1251 </h4> 1252 1253 <div class="comments"> 1254 Buttons will be arranged in the number of rows 1255 specified by this keyword. 1256 </div> 1257 1258 <h4 id="_CW_BGROUP_keyword_SCROLL">SCROLL 1259 1260 1261 1262 1263 1264 1265 1266 1267 </h4> 1268 1269 <div class="comments"> 1270 If set, the base will include scroll bars to allow 1271 viewing a large base through a smaller viewport. 1272 </div> 1273 1274 <h4 id="_CW_BGROUP_keyword_SET_VALUE">SET_VALUE 1275 1276 1277 1278 1279 1280 1281 1282 1283 </h4> 1284 1285 <div class="comments"> 1286 The initial value of the buttons. This is equivalent 1287 to the later statement: 1288 1289 WIDGET_CONTROL, widget, set_value=value 1290 </div> 1291 1292 <h4 id="_CW_BGROUP_keyword_SPACE">SPACE 1293 1294 1295 1296 1297 1298 1299 1300 1301 </h4> 1302 1303 <div class="comments"> 1304 The space, in pixels, to be left around the edges 1305 of a row or column major base. This keyword is 1306 ignored if EXCLUSIVE or NONEXCLUSIVE are specified. 1307 </div> 1308 1309 <h4 id="_CW_BGROUP_keyword_TAB_MODE">TAB_MODE 1310 1311 1312 1313 1314 1315 1316 1317 1318 </h4> 1319 1117 1320 <div class="comments"></div> 1118 1321 1119 <h4 id="_CW_BGROUP_keyword_COLUMN">COLUMN 1120 1121 1122 1123 1124 1125 1126 1127 1128 </h4>1129 1130 <div class="comments"></div>1131 1132 <h4 id="_CW_BGROUP_keyword_EVENT_FUNCT">EVENT_FUNCT 1133 1134 1135 1136 1137 1138 1139 1140 1141 </h4>1142 1143 <div class="comments"></div>1144 1145 <h4 id="_CW_BGROUP_keyword_EXCLUSIVE">EXCLUSIVE 1146 1147 1148 1149 1150 1151 1152 1153 1154 </h4>1155 1156 <div class="comments"></div>1157 1158 <h4 id="_CW_BGROUP_keyword_FONT">FONT 1159 1160 1161 1162 1163 1164 1165 1166 1167 </h4>1168 1169 <div class="comments"></div>1170 1171 <h4 id="_CW_BGROUP_keyword_FRAME">FRAME 1172 1173 1174 1175 1176 1177 1178 1179 1180 </h4>1181 1182 <div class="comments"></div>1183 1184 <h4 id="_CW_BGROUP_keyword_IDS">IDS 1185 1186 1187 1188 1189 1190 1191 1192 1193 </h4>1194 1195 <div class="comments"></div>1196 1197 <h4 id="_CW_BGROUP_keyword_LABEL_TOP">LABEL_TOP 1198 1199 1200 1201 1202 1203 1204 1205 1206 </h4>1207 1208 <div class="comments"></div>1209 1210 <h4 id="_CW_BGROUP_keyword_LABEL_LEFT">LABEL_LEFT 1211 1212 1213 1214 1215 1216 1217 1218 1219 </h4>1220 1221 <div class="comments"></div>1222 1223 <h4 id="_CW_BGROUP_keyword_MAP">MAP 1224 1225 1226 1227 1228 1229 1230 1231 1232 </h4>1233 1234 <div class="comments"></div>1235 1236 <h4 id="_CW_BGROUP_keyword_NONEXCLUSIVE">NONEXCLUSIVE 1237 1238 1239 1240 1241 1242 1243 1244 1245 </h4>1246 1247 <div class="comments"></div>1248 1249 <h4 id="_CW_BGROUP_keyword_NO_RELEASE">NO_RELEASE 1250 1251 1252 1253 1254 1255 1256 1257 1258 </h4>1259 1260 <div class="comments"></div>1261 1262 <h4 id="_CW_BGROUP_keyword_RETURN_ID">RETURN_ID 1263 1264 1265 1266 1267 1268 1269 1270 1271 </h4>1272 1273 <div class="comments"></div>1274 1275 <h4 id="_CW_BGROUP_keyword_RETURN_INDEX">RETURN_INDEX 1276 1277 1278 1279 1280 1281 1282 1283 1284 </h4>1285 1286 <div class="comments"></div>1287 1288 <h4 id="_CW_BGROUP_keyword_RETURN_NAME">RETURN_NAME 1289 1290 1291 1292 1293 1294 1295 1296 1297 </h4>1298 1299 <div class="comments"></div>1300 1301 <h4 id="_CW_BGROUP_keyword_ROW">ROW 1302 1303 1304 1305 1306 1307 1308 1309 1310 </h4>1311 1312 <div class="comments"></div>1313 1314 <h4 id="_CW_BGROUP_keyword_SCROLL">SCROLL 1315 1316 1317 1318 1319 1320 1321 1322 1323 </h4>1324 1325 <div class="comments"></div>1326 1327 <h4 id="_CW_BGROUP_keyword_SET_VALUE">SET_VALUE 1328 1329 1330 1331 1332 1333 1334 1335 1336 </h4>1337 1338 <div class="comments"></div>1339 1340 <h4 id="_CW_BGROUP_keyword_SPACE">SPACE 1341 1342 1343 1344 1345 1346 1347 1348 1349 </h4>1350 1351 <div class="comments"></div>1352 1353 <h4 id="_CW_BGROUP_keyword_TAB_MODE">TAB_MODE 1354 1355 1356 1357 1358 1359 1360 1361 1362 </h4>1363 1364 <div class="comments"></div>1365 1366 1322 <h4 id="_CW_BGROUP_keyword_UVALUE">UVALUE 1367 1323 … … 1375 1331 </h4> 1376 1332 1377 <div class="comments"></div> 1333 <div class="comments"> 1334 The user value to be associated with the widget. 1335 </div> 1378 1336 1379 1337 <h4 id="_CW_BGROUP_keyword_XOFFSET">XOFFSET … … 1388 1346 </h4> 1389 1347 1390 <div class="comments"></div> 1348 <div class="comments"> 1349 The X offset of the widget relative to its parent. 1350 </div> 1391 1351 1392 1352 <h4 id="_CW_BGROUP_keyword_XPAD">XPAD … … 1401 1361 </h4> 1402 1362 1403 <div class="comments"></div> 1363 <div class="comments"> 1364 The horizontal space, in pixels, between children 1365 of a row or column major base. Ignored if EXCLUSIVE 1366 or NONEXCLUSIVE are specified. 1367 </div> 1404 1368 1405 1369 <h4 id="_CW_BGROUP_keyword_XSIZE">XSIZE … … 1414 1378 </h4> 1415 1379 1416 <div class="comments"></div> 1380 <div class="comments"> 1381 The width of the base.</div> 1417 1382 1418 1383 <h4 id="_CW_BGROUP_keyword_X_SCROLL_SIZE">X_SCROLL_SIZE … … 1427 1392 </h4> 1428 1393 1429 <div class="comments"></div> 1394 <div class="comments"> 1395 The width of the viewport if SCROLL is specified. 1396 </div> 1430 1397 1431 1398 <h4 id="_CW_BGROUP_keyword_YOFFSET">YOFFSET … … 1440 1407 </h4> 1441 1408 1442 <div class="comments"></div> 1409 <div class="comments"> 1410 The Y offset of the widget relative to its parent. 1411 </div> 1443 1412 1444 1413 <h4 id="_CW_BGROUP_keyword_YPAD">YPAD … … 1453 1422 </h4> 1454 1423 1455 <div class="comments"></div> 1424 <div class="comments"> 1425 The vertical space, in pixels, between children of 1426 a row or column major base. Ignored if EXCLUSIVE 1427 or NONEXCLUSIVE are specified. 1428 </div> 1456 1429 1457 1430 <h4 id="_CW_BGROUP_keyword_YSIZE">YSIZE … … 1466 1439 </h4> 1467 1440 1468 <div class="comments"></div> 1441 <div class="comments"> 1442 The height of the base. 1443 </div> 1469 1444 1470 1445 <h4 id="_CW_BGROUP_keyword_Y_SCROLL_SIZE">Y_SCROLL_SIZE … … 1479 1454 </h4> 1480 1455 1481 <div class="comments"></div> 1456 <div class="comments"> 1457 The height of the viewport if SCROLL is specified. 1458 </div> 1482 1459 1483 1460 <h4 id="_CW_BGROUP_keyword_UNAME">UNAME … … 1492 1469 </h4> 1493 1470 1494 <div class="comments"></div> 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1471 <div class="comments"> 1472 The user name to be associated with the widget. 1473 </div> 1474 1475 1476 1477 1478 <h3>Version history</h3> 1479 1480 <h4>Version</h4><div class="preformat"> 1481 $Id: cw_bgroup.pro 150 2006-08-09 10:12:54Z navarro $ 1482 </div> 1483 <h4>History</h4><div class="preformat"> 1484 15 June 1992, AB 1485 7 April 1993, AB, Removed state caching. 1486 6 Oct. 1994, KDB, Font keyword is not applied to the label. 1487 10 FEB 1995, DJC fixed bad bug in event procedure, getting 1488 id of stash widget. 1489 11 April 1995, AB Removed Motif special cases. 1490 1491 Copyright (c) 1992-2005, Research Systems, Inc. All rights reserved. 1492 Unauthorized reproduction prohibited. 1493 </div> 1494 1495 1496 <h3>Known issues</h3> 1497 1498 1499 1500 <h4>Restrictions</h4><div class="preformat"> 1501 This widget generates event structures with the following definition: 1502 1503 event = { ID:0L, TOP:0L, HANDLER:0L, SELECT:0, VALUE:0 } 1504 1505 The SELECT field is passed through from the button event. VALUE is 1506 either the INDEX, ID, NAME, or BUTTON_UVALUE of the button, 1507 depending on how the widget was created. 1508 1509 1510 Only buttons with textual names are handled by this widget. 1511 Bitmaps are not understood. 1512 </div> 1510 1513 1511 1514
Note: See TracChangeset
for help on using the changeset viewer.