home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / drdialog / drdialog.inf (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1994-02-27  |  555.3 KB  |  7,796 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. (c) Copyright International Business Machines Corporation 1993.
  5. All rights reserved.
  6.  
  7. DrDialog is a tool for creating and editing OS/2 Presentation Manager dialogs. 
  8. It is both powerful and easy to use. 
  9.  
  10. With its DrRexx feature, it is also a complete visual programming environment 
  11. for REXX based applications. 
  12.  
  13. DrDialog can create new dialogs from scratch, as well as import dialog files 
  14. previously created with the standard OS/2 dialog editor (i.e. DLGEDIT). It also 
  15. has the unique ability to grab dialogs, menus and controls right off the screen 
  16. and import them directly into the editor. 
  17.  
  18. DrDialog creates standard .RES and .DLG files for use with the OS/2 resource 
  19. compiler (i.e. RC). It can also create equate files for use with various 
  20. high-level languages (i.e. .H files for C or C++, and .DEF files for Oberon). 
  21.  
  22. DrDialog has a number of tools to help you create and edit dialogs. Most of the 
  23. tools can also be invoked in several ways: from a menu bar, pop-up menu, or a 
  24. toolbar, whichever is most convenient to your style of working. 
  25.  
  26. The available tools include: 
  27.  
  28. Tools        This toolbar window contains iconic buttons to display all of the 
  29.              other tool windows and perform global actions for the editor. 
  30. ID           The ID tool window. This window controls the type of information 
  31.              displayed in each control while the editor is in ID mode. 
  32. Controls     The controls tool window. This window contains icons for each 
  33.              control type supported by the editor. Use button 2 to drag and 
  34.              drop an icon from the controls tool into the edit dialog to create 
  35.              a control of the selected type. 
  36. Group        The group tools window. This window contains iconic buttons which 
  37.              perform various operations on the currently selected group of 
  38.              controls within the current edit dialog. 
  39. Size         The size tool window. This window allows you to display and edit 
  40.              the size and location of the currently active control in the 
  41.              current edit dialog. 
  42. Text         The text tool window. This window allows you to edit the text and 
  43.              font for the currently active control in the current edit dialog. 
  44. Color        The color tool window. This window allows you to edit the colors 
  45.              for the currently active control in the current edit dialog. 
  46. Name         The name tool window. This window allows you to display and edit 
  47.              the names and associated ID's of all controls in the current edit 
  48.              dialog. 
  49. DrRexx       The DrRexx tool window. This window displays the set of events 
  50.              associated a control in the current edit dialog. It also allows 
  51.              editing the REXX code associated with the current edit dialog. 
  52. Menu         The drop-down menu tool window. This window allows you to edit the 
  53.              drop-down menu associated with the current edit dialog. 
  54. Run-time     The run-time tool window. This window allows you to control the 
  55.              execution of the DrRexx application being edited. 
  56.  
  57.  
  58. ΓòÉΓòÉΓòÉ 2. Asking for help ΓòÉΓòÉΓòÉ
  59.  
  60. This document describes how to use DrDialog. It can be read sequentially or in 
  61. a random order, using the imbedded hypertext links. It can also be accessed 
  62. contextually, directly from DrDialog. 
  63.  
  64. To request contextual help for any DrDialog tool or window, do the following: 
  65.  
  66.  1. Make sure the desired window has the focus (click on its title bar with 
  67.     button 1 if necessary). 
  68.  2. Position the pointer over the part of the window you want help with. 
  69.  3. Press F1 to request help. 
  70.  
  71. If specific help about the icon or control you are pointing at is available, it 
  72. will be displayed. Otherwise, more general help about the particular DrDialog 
  73. tool or window will be displayed. 
  74.  
  75. Help is also provided by the two controls at the bottom of the DrDialog 
  76. background window. As the pointer is moved around the screen, the leftmost 
  77. control displays a description of the DrDialog window the pointer is currently 
  78. in, while the rightmost control describes the function of the control the 
  79. pointer is currently over. If the pointer is over an edit dialog, the rightmost 
  80. control displays the ID number, name and type of the control pointed at in the 
  81. form: ID = name [type], while the leftmost control indicates whether the edit 
  82. dialog containing it is active (i.e. the current dialog) or inactive. 
  83.  
  84.  
  85. ΓòÉΓòÉΓòÉ 3. Editing a dialog ΓòÉΓòÉΓòÉ
  86.  
  87. DrDialog is designed to make creating and editing dialogs as simple and 
  88. intuitive as possible. Wherever possible, it attempts to follow CUA guidelines 
  89. for selecting and manipulating controls and their attributes. 
  90.  
  91. The editor also allows you to edit more than one dialog at a time. In fact, any 
  92. number of dialogs can be on the screen at the same time. However, at any given 
  93. instant, only one dialog is considered to be the current edit dialog. This is 
  94. an important distinction to remember, because all DrDialog tools operate on the 
  95. current edit dialog. The current, or active, dialog appears normal, while all 
  96. inactive dialogs appear to be subdued, or greyed out. 
  97.  
  98. You can make any inactive dialog the current edit dialog by clicking on it with 
  99. either the left or right mouse button. You can also use the Dialog select tool 
  100. to select the new current dialog from a list of all dialogs being edited. This 
  101. is especially handy if the dialog you wish to edit is not currently visible. 
  102.  
  103.  
  104. ΓòÉΓòÉΓòÉ 3.1. Container controls ΓòÉΓòÉΓòÉ
  105.  
  106. Controls may be considered to be of two types: 
  107.  
  108. o Controls which convey information or interact with the user (e.g. text fields 
  109.   and push buttons) 
  110. o Controls which help to visually organize the first type of control (e.g. 
  111.   group boxes) 
  112.  
  113. In DrDialog the second type of control is called a container control and has 
  114. certain special attributes. The control types recognized by the editor as 
  115. container controls are: 
  116.  
  117.           Group box 
  118.           Frame 
  119.           Rectangle 
  120.           Canvas (not a standard OS/2 control) 
  121.           Paint (not a standard OS/2 control) 
  122.           Billboard (not a standard OS/2 control) 
  123.           Turtle (not a standard OS/2 control) 
  124.           Bagbutton (not a standard OS/2 control) 
  125.           User (not a standard OS/2 control) 
  126.  
  127. Note:  Billboard, turtle, and user controls can either be container or 
  128. non-container controls, depending upon the setting of the container check box 
  129. in their respective style dialogs. 
  130.  
  131. Note: 
  132.  
  133. Container controls differ from non-container controls in the following ways: 
  134.  
  135. o Container controls are always visually below non-container controls. 
  136. o Container controls contain things (non-container controls and other container 
  137.   controls). When a container control is moved or copied, the controls it 
  138.   contains are moved or copied with it. 
  139.  
  140. Note:  For a control to be contained within a container control, it must be 
  141. completely within the bounds of the container control. If any part of the 
  142. control is outside of the container, then it is not contained within that 
  143. container. 
  144.  
  145. The notion of being contained is important because many DrDialog tools perform 
  146. actions on the controls contained within a container as well as on the 
  147. container. 
  148.  
  149.  
  150. ΓòÉΓòÉΓòÉ 3.2. Selecting controls ΓòÉΓòÉΓòÉ
  151.  
  152. All controls within the current edit dialog are in one of three states: 
  153.  
  154. o Inactive 
  155. o Selected 
  156. o Active 
  157.  
  158. These three states are indicated visually within the editor by the appearance 
  159. of the grab handles drawn on each control when in edit mode, and illustrated 
  160. below: 
  161.  
  162. Inactive: 
  163.  
  164. Selected: 
  165.  
  166. Active: 
  167.  
  168. Most DrDialog tools operate on the set of currently selected controls. 
  169. Selection is performed using button 1 of the mouse. Whenever there is one or 
  170. more selected controls, one of the selected controls has the additional status 
  171. of being the active control. Normally, this is the first control selected when 
  172. performing a selection operation. 
  173.  
  174. To select a single control: 
  175.           Click and release button 1 anywhere within the control to be 
  176.           selected. All other previously selected controls revert to the 
  177.           inactive state, and the control clicked on is selected and becomes 
  178.           the active control. 
  179.  
  180. To select several controls: 
  181.           Press button 1 and drag the pointer over all controls to be selected. 
  182.           As soon as button 1 is pressed, all previously selected controls 
  183.           revert to the inactive state. The first control the pointer touches 
  184.           becomes the active control, and each subsequent control becomes a 
  185.           selected control. 
  186.  
  187.           Note:  If the pointer starts in a control contained within a 
  188.           container control and later passes into the container, the container 
  189.           will not be selected. Conversely, if the pointer starts within a 
  190.           container and later passes over controls contained within the 
  191.           container, the contained controls will not be selected. This 
  192.           complicated sounding, yet simple, rule makes it easy to select either 
  193.           containers or the controls contained within them. 
  194.  
  195. To extend the current control selection: 
  196.           Once button 1 of the mouse has been released, inactive controls can 
  197.           be added to the current set of selected controls using either of the 
  198.           following methods: 
  199.  
  200.    o Press the Ctrl or Shift key on the keyboard, then select the additional 
  201.      controls using either of the techniques described above (i.e. either click 
  202.      or perform a drag operation with button 1 pressed). 
  203.    o Position the pointer over the lower left hand grab handle of the first 
  204.      inactive control to be added, then either click or begin a drag operation 
  205.      with button 1. 
  206.  
  207. To change the active control: 
  208.           An already selected control can be made the active control by 
  209.           clicking (i.e. pressing and releasing) button 1 in the lower left 
  210.           hand grab handle of the control. The previous active control will 
  211.           switch to the selected state. 
  212.  
  213. Note:  The dialog itself can only be selected using the first method described 
  214. above. It will never be selected using any of the other methods. 
  215.  
  216. Note:  Double-clicking a control with button 1 will both make it the active 
  217. control and invoke the DrRexx window so that you can edit or view the REXX 
  218. event handlers associated with the control. 
  219.  
  220.  
  221. ΓòÉΓòÉΓòÉ 3.3. Moving controls ΓòÉΓòÉΓòÉ
  222.  
  223. Any control can be moved around within its dialog by placing the pointer over 
  224. the control and then using button 2 of the mouse to drag the control to its new 
  225. location. 
  226.  
  227. If the control to be moved is in the selected or active state, all other 
  228. selected or active controls are also moved with it. This fact is indicated 
  229. visually by the size of the tracking rectangle that appears while the mouse is 
  230. being dragged. 
  231.  
  232. If any of the controls being moved is a container control, all of the controls 
  233. it contains are also moved. 
  234.  
  235. Note:  The entire dialog can also be moved using this technique. Just position 
  236. the pointer over any part of the dialog not covered by a control (e.g. the 
  237. title bar) and use button 2 to drag the dialog to its new position as described 
  238. above. 
  239.  
  240.  
  241. ΓòÉΓòÉΓòÉ 3.4. Moving controls between dialogs ΓòÉΓòÉΓòÉ
  242.  
  243. Using the technique described in the previous section, controls can only be 
  244. moved around within the current edit dialog. However, if desired, it is also 
  245. possible to move controls between dialogs. 
  246.  
  247. To do this, first make sure that both dialogs involved in the operation are 
  248. visible on the screen, and that the dialog containing the controls to be moved 
  249. is the current edit dialog. Then press the Shift key on the keyboard and 
  250. perform a move operation exactly as described before, making sure that the 
  251. pointer ends up somewhere over the dialog to which the controls are being 
  252. moved. 
  253.  
  254. Pressing the Shift key removes the bounds keeping the move operation within the 
  255. current edit dialog and allows you to drag the controls anywhere on the screen. 
  256. When you release button 2 of the pointer, the editor checks to see which edit 
  257. dialog is directly under the pointer and moves the controls to that dialog. If 
  258. the pointer is not over any edit dialog, the editor beeps to indicate an error 
  259. and does not move the controls. 
  260.  
  261.  
  262. ΓòÉΓòÉΓòÉ 3.5. Copying controls ΓòÉΓòÉΓòÉ
  263.  
  264. Any control can be copied by placing the pointer over the control, pressing the 
  265. Ctrl key on the keyboard, and then using button 2 of the mouse to drag a copy 
  266. of the control to its new location. 
  267.  
  268. If the control to be copied is in the selected or active state, all other 
  269. selected or active controls are also copied. This fact is indicated visually by 
  270. the size of the tracking rectangle that appears while the mouse is being 
  271. dragged. 
  272.  
  273. If any of the controls being copied is a container control, all of the controls 
  274. it contains are also copied. 
  275.  
  276. Note:  The entire dialog can also be copied using this technique. Just position 
  277. the pointer over any part of the dialog not covered by a control (e.g. the 
  278. title bar) and use button 2 with the Ctrl key pressed to drag a complete copy 
  279. of the dialog to its new position as described above. 
  280.  
  281.  
  282. ΓòÉΓòÉΓòÉ 3.6. Copying controls between dialogs ΓòÉΓòÉΓòÉ
  283.  
  284. Using the technique described in the previous section, controls can only be 
  285. copied within the current edit dialog. However, if desired, it is also possible 
  286. to copy controls between dialogs. 
  287.  
  288. To do this, first make sure that both dialogs involved in the operation are 
  289. visible on the screen, and that the dialog containing the controls to be copied 
  290. is the current edit dialog. Then press the Shift key on the keyboard and 
  291. perform a copy operation exactly as described before, making sure that the 
  292. pointer ends up somewhere over the dialog to which the controls are being 
  293. copied. 
  294.  
  295. Pressing the Shift key removes the bounds keeping the copy operation within the 
  296. current edit dialog and allows you to drag the controls anywhere on the screen. 
  297. When you release button 2 of the pointer, the editor checks to see which edit 
  298. dialog is directly under the pointer and copies the controls to that dialog. If 
  299. the pointer is not over any edit dialog, the editor beeps to indicate an error 
  300. and does not copy any controls. 
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ 3.7. Sizing controls ΓòÉΓòÉΓòÉ
  304.  
  305. The currently active control can be resized by placing the mouse pointer over 
  306. one of the eight grab handles and using button 2 of the mouse to drag a 
  307. tracking rectangle into the desired shape. The fact that the mouse is over one 
  308. of the grab handles is indicated by a change in the shape of the mouse pointer 
  309. to reflect the directions the control can be resized in. 
  310.  
  311. If the control being resized is a container control, only the container itself 
  312. is affected by the resize operation. However, if the Ctrl key on the keyboard 
  313. is being pressed at the start of the resizing operation, all controls contained 
  314. within the container are resized proportionally also. 
  315.  
  316.  
  317. ΓòÉΓòÉΓòÉ 3.8. Editing a control's style information ΓòÉΓòÉΓòÉ
  318.  
  319. Each control has associated with it style information that can affect the 
  320. appearance and behavior of the control. The style information for a control can 
  321. be edited by selecting the Style... option from the pop-up menu that appears 
  322. after clicking button 2 while the pointer is over the control (the control need 
  323. not be selected first). 
  324.  
  325. Changes made to the style information using the pop-up dialog that appears will 
  326. be reflected immediately in the appearance of the control. Once all changes 
  327. have been made, they can be finalized either by pressing the Enter key or 
  328. clicking the OK button at the bottom of the dialog. Alternatively, the previous 
  329. style information can be restored by clicking on the Cancel button. In either 
  330. case, the pop-up dialog will be removed from the display. 
  331.  
  332. Note:  Only one pop-up dialog exists per control type. If the pop-up dialog for 
  333. a particular control type is already being displayed when a new control of the 
  334. same type is selected, the style information for the newly selected control 
  335. will replace the previous style information within the pop-up dialog. This 
  336. allows the style information for a collection of identical control types to be 
  337. edited very quickly and easily. The same is true if button 2 is clicked within 
  338. a control of the type corresponding to the pop-up dialog. 
  339.  
  340.  
  341. ΓòÉΓòÉΓòÉ 3.9. Editing a control's REXX code ΓòÉΓòÉΓòÉ
  342.  
  343. Each control optionally has associated with it REXX code to process various 
  344. events that occur for the control (e.g. a push button click event). The REXX 
  345. code for each control is edited using the DrRexx tool window. The editor 
  346. provides a quick path to this tool by double-clicking a control in the edit 
  347. dialog. The DrRexx tool window will appear with the set of event pages for the 
  348. clicked on control already displayed. To select the REXX code for a particular 
  349. event, click on its corresponding page tab and the REXX code associated with 
  350. the event will be displayed for editing. 
  351.  
  352. Note:  If the number of events defined for a particular control is large, it 
  353. may be necessary to use the scroll buttons on the side of the DrRexx notebook 
  354. in order to scroll all of the event page tabs into view. 
  355.  
  356.  
  357. ΓòÉΓòÉΓòÉ 3.10. Editing a control's attributes using the pop-up menu ΓòÉΓòÉΓòÉ
  358.  
  359. While all of a control's attributes can be edited using the various tools 
  360. provided by DrDialog, the editor also provides a means to quickly and easily 
  361. modify most of a control's attributes using a context sensitive pop-up menu. 
  362.  
  363. To use the pop-up menu, first position the pointer over the control whose 
  364. attributes are to be changed, then click (i.e. press and release) button 2 of 
  365. the mouse. 
  366.  
  367. The pop-up menu's options are divided into three categories: 
  368.  
  369. o Global 
  370. o Control sensitive 
  371. o Group sensitive 
  372.  
  373. The global options at the top of the pop-up menu are not specific to the 
  374. control over which the pointer is positioned. The two global options are: 
  375.  
  376. Tools       This submenu contains icons for each of the DrDialog tool windows. 
  377.             Selecting an icon will display the corresponding tool window. This 
  378.             submenu contains the same set of icons displayed in the Tools 
  379.             submenu of the DrDialog menu bar. 
  380. Controls    This submenu contains icons for each type of DrDialog control. 
  381.             Selecting an icon will create a corresponding control centered at 
  382.             the point where the pointer was when the pop-up menu was invoked. 
  383.             This submenu contains the same set of icons displayed in the 
  384.             Controls submenu of the DrDialog menu bar and in the Control 
  385.             window. 
  386.  
  387. The control sensitive options in the middle of the pop-up menu operate on the 
  388. control the pointer was positioned over when the pop-up menu was invoked. The 
  389. control sensitive options are: 
  390.  
  391. Remove      This submenu contains two icons. The icon hides the specified 
  392.             control. The control can be made visible again using the button 
  393.             available in the Group window or pop-up menu option. The icon 
  394.             deletes the specified control. If the specified control is the 
  395.             dialog itself, you will be prompted whether you wish to delete the 
  396.             entire dialog or not. 
  397. Events      This submenu lists all DrRexx events defined for the specified 
  398.             control. Selecting an option from the submenu will cause the DrRexx 
  399.             window to appear with the specified event page already displayed. 
  400. Text        Displays a pop-up dialog that allows you to change the text for the 
  401.             specified control. 
  402. Style       Displays a pop-up dialog that allows you to change the style for 
  403.             the specified control. 
  404. Name        Displays a pop-up dialog that allows you to change the name of the 
  405.             specified control. 
  406. ID          Displays a pop-up dialog that allows you to change the numeric ID 
  407.             of the specified control. 
  408. Color       Displays a pop-up dialog that allows you to change the foreground 
  409.             and background color of the specified control. If you need to 
  410.             change more than the foreground or background color of the control, 
  411.             you must use the Color window. 
  412. Font        Displays a pop-up dialog that allows you to change the font for the 
  413.             specified control. 
  414. Adjust      Displays a pop-up dialog that allows you to change the position or 
  415.             size of the specified control one pel at a time. Whether the size 
  416.             or position of the control is adjusted depends upon the position of 
  417.             the pointer at the time the pop-up menu was invoked. If the pointer 
  418.             was over one of the grab handles for the control, the size of the 
  419.             control will be adjusted. If the pointer was anywhere else over the 
  420.             control, the position of the control will be adjusted. 
  421.  
  422.             Note:  If the pointer is over a control that is selected, all other 
  423.             selected controls are also adjusted at the same time. This makes it 
  424.             easy to move an entire group of controls around one pixel at a 
  425.             time. 
  426.  
  427. The group sensitive option at the bottom of the pop-up menu operates on the 
  428. group of currently selected controls and is enabled only if the control the 
  429. pointer is positioned over is selected or active. The group sensitive option 
  430. is: 
  431.  
  432. Group       Displays a pop-up dialog containing iconic buttons for aligning, 
  433.             spacing, sizing, hiding, showing, deleting and setting the styles 
  434.             of the current group of selected controls. These are the same 
  435.             buttons that can alse be found in the Group window. 
  436.  
  437. Any pop-up dialog that appears as a result of selecting a pop-up menu option 
  438. will automatically be removed when any other DrDialog window is given the focus 
  439. or a new pop-up menu is requested. It can also be removed explicitly by 
  440. clicking the or buttons in the dialog. 
  441.  
  442.  
  443. ΓòÉΓòÉΓòÉ 4. Tools window ΓòÉΓòÉΓòÉ
  444.  
  445.  
  446. ΓòÉΓòÉΓòÉ <hidden> Tools window ΓòÉΓòÉΓòÉ
  447.  
  448. The tools window is a toolbar (i.e. array of iconic buttons). Each button in 
  449. the toolbar either activates another editor tool window or performs an action 
  450. global to the operation of the editor. 
  451.  
  452. When a button representing a tool window is clicked, the corresponding tool 
  453. window is displayed in the position it last had. 
  454.  
  455. As an alternative to using the tool window, all of the same functions are also 
  456. available using the Tools submenu of either the DrDialog menu bar or the pop-up 
  457. menu. 
  458.  
  459. To learn more about the function of a particular tool window button, 
  460. double-click on the image of the button displayed in the other window. 
  461.  
  462.  
  463. ΓòÉΓòÉΓòÉ 4.1. Help tool ΓòÉΓòÉΓòÉ
  464.  
  465. Clicking the help button causes this document to be displayed. 
  466.  
  467.  
  468. ΓòÉΓòÉΓòÉ 4.2. About tool ΓòÉΓòÉΓòÉ
  469.  
  470. Clicking the about button causes the DrDialog logo window to be displayed: 
  471.  
  472.  
  473. ΓòÉΓòÉΓòÉ 4.3. View tool ΓòÉΓòÉΓòÉ
  474.  
  475. Clicking the view button toggles all dialogs being edited between edit and view 
  476. mode. In edit mode (the initial mode of the editor), each dialog control is 
  477. drawn with a dashed line surrounding it to indicate the bounds of the control. 
  478. In addition, one or more grab handles are drawn for use in sizing and selecting 
  479. the control. A typical dialog in edit mode might appear as follows: 
  480.  
  481. In view mode, each dialog control appears as it would in normal use, with no 
  482. additional lines or grab handles drawn over it. Note however that the grab 
  483. handles are still logically there, and may be used in exactly the same manner 
  484. as edit mode. A typical dialog in view mode might appear as follows: 
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ 4.4. Grab tool ΓòÉΓòÉΓòÉ
  488.  
  489. Clicking the grab button activates grab mode. In grab mode the mouse pointer 
  490. changes to a pointing hand. Positioning the pointer over any dialog frame, menu 
  491. or control currently on the screen and dragging it with button 2 into the 
  492. editor will import the specified object directly into the editor. 
  493.  
  494. Based on what you grab, there are several possible results: 
  495.  
  496. o If you grab the frame of a dialog, the entire dialog and all of its controls, 
  497.   menus and submenus will be imported into the editor as the new current edit 
  498.   dialog. 
  499. o If you grab a control, the control will be added to the current edit dialog 
  500.   at the point where you release button 2. If the drag outline does not 
  501.   intersect the current edit dialog when button 2 is released, a beep sounds 
  502.   and the control is not added to the edit dialog. 
  503. o If you grab a menu bar, the menu and all of its submenus will become the 
  504.   current edit dialog's menu. If the current edit dialog already has a menu, 
  505.   you will first be prompted if you wish to replace it with the menu you just 
  506.   grabbed. If the grabbed menu becomes the current edit dialog's menu, the Menu 
  507.   window is automatically displayed to allow you to edit the menu just 
  508.   imported. 
  509.  
  510. If you decide not to grab anything once in grab mode, click button 1 of the 
  511. mouse to exit grab mode without taking any action. Note however that you will 
  512. receive an informational message indicating that you should use button 2 to 
  513. drag the desired object. 
  514.  
  515. Note:  If you attempt to grab something that cannot be copied, the editor will 
  516. beep and exit grab mode without taking any action. 
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ 4.5. Dialog load tool ΓòÉΓòÉΓòÉ
  520.  
  521. The dialog load button loads a resource (i.e. .RES) file containing one or more 
  522. dialogs into the editor. If any changes have been made to the current set of 
  523. dialogs, you will be asked if you wish to discard the changes and proceed with 
  524. loading a new resource file. 
  525.  
  526. A standard file dialog will be displayed. Enter the name of the file to be 
  527. edited and press Enter, or click on the Open button to continue. Alternatively, 
  528. you can click on the Cancel button to return to the editor without loading a 
  529. new resource file. 
  530.  
  531. If the selected file exists and is a valid resource file, the dialogs it 
  532. contains will be loaded into the editor for further editing. The editor will 
  533. automatically select the first dialog found in the file as the current dialog. 
  534.  
  535. If, in addition, the resource file was last edited using DrDialog, any symbols 
  536. assigned to controls or dialogs will automatically be loaded into the editor. 
  537. If the file was last edited using a different dialog editor (e.g. DLGEDIT), 
  538. DrDialog will check for an include file with a .H extension in the same 
  539. directory as the resource file being loaded. If the file exists, the editor 
  540. will use any #define statements found in the .H file to define symbolic names 
  541. for the controls and dialogs found in the resource file. 
  542.  
  543. If no corresponding .H file is found, and the Prompt for .H file (if necessary) 
  544. option was checked in the file open dialog, DrDialog will prompt you for the 
  545. name of the include file containing the symbolic names. If the option was not 
  546. checked, the resource file will be loaded with no symbolic names initially 
  547. defined. 
  548.  
  549. Note:  An existing resource file can also be loaded into the editor by 
  550. selecting the Open... option from the File submenu of the DrDialog window menu 
  551. bar. 
  552.  
  553.  
  554. ΓòÉΓòÉΓòÉ 4.6. Dialog save tool ΓòÉΓòÉΓòÉ
  555.  
  556. The dialog save button saves information about the current set of dialogs into 
  557. one or more files. 
  558.  
  559. A standard file dialog will be displayed. Enter the name of the file to be used 
  560. for saving the dialogs. You should also specify what type of dialog information 
  561. is to be saved, and for what language, using the check boxes and radio buttons 
  562. located near the bottom of the file dialog. The available choices for type of 
  563. information to be saved are: 
  564.  
  565. Resource    Save the current dialogs in the OS/2 standard binary .RES file 
  566.             format. 
  567. Dialog      Save the current dialogs in the OS/2 standard text .DLG file 
  568.             format. 
  569. Equates     Save the name and ID information for the current dialogs in a 
  570.             format suitable for use with the selected language. For C or C++, 
  571.             this is a .H file containing statements of the form: #define name 
  572.             ID. For Oberon, this is a .DEF file containing CONST's of the form: 
  573.             name* = ID;. 
  574. WinProc     Not currently implemented (has no effect). 
  575.  
  576. Note:  When entering the name of the file to be saved, it is not necessary to 
  577. specify the file extension. A file extension will be provided for each type of 
  578. information to be saved: 
  579.  
  580. .RES      For resource files 
  581. .DLG      For dialog files 
  582. .H        For C or C++ equate files 
  583. .DEF      For Oberon equate files 
  584.  
  585. Once the file name has been entered, and the type of information to be saved 
  586. has been specified, press Enter or click on the Save button to continue saving 
  587. the requested files. Alternatively, you can click on the Cancel button to 
  588. return to the editor without writing any files. 
  589.  
  590. Note:  The names associated with the dialog controls are save as a special 
  591. resource type within the .RES file. This allows the names to be recovered the 
  592. next time the resource file is loaded into the editor. Editing the dialog with 
  593. a different dialog editor may cause the names assigned to the various controls 
  594. and dialogs to be lost. 
  595.  
  596. Note:  The current set of dialogs can also be saved to a file using the Save or 
  597. Save as... options in the File submenu of the DrDialog window menu bar. 
  598.  
  599.  
  600. ΓòÉΓòÉΓòÉ 4.7. Stop tool ΓòÉΓòÉΓòÉ
  601.  
  602. Clicking the stop button terminates DrDialog. 
  603.  
  604. If a resource file with unsaved changes is being edited at the time the stop 
  605. button is clicked, you will be prompted first to verify that you wish to 
  606. discard the current file before terminating the editor. 
  607.  
  608.  
  609. ΓòÉΓòÉΓòÉ <hidden> Controls window ΓòÉΓòÉΓòÉ
  610.  
  611. The controls window shows all the controls that can be created using DrDialog. 
  612. To create a control of a particular type, use button 2 of the mouse to drag and 
  613. drop from the icon representing the desired control to the location in the edit 
  614. dialog where you want to place the control. Once the control has been created, 
  615. it will automatically be made active for sizing or other editing operations. 
  616.  
  617. To learn more about the individual controls that can be created using the 
  618. controls window, double-click on the image of the icon displayed in the other 
  619. window. 
  620.  
  621.  
  622. ΓòÉΓòÉΓòÉ 4.8. Controls window ΓòÉΓòÉΓòÉ
  623.  
  624.  
  625. ΓòÉΓòÉΓòÉ 4.9. Group window ΓòÉΓòÉΓòÉ
  626.  
  627.  
  628. ΓòÉΓòÉΓòÉ <hidden> Group window ΓòÉΓòÉΓòÉ
  629.  
  630. The group window is a collection of tools for aligning, sizing, spacing, 
  631. hiding, showing, deleting and setting the styles of groups of controls. It 
  632. consists of an array of iconic buttons which operate either on the group of 
  633. currently selected controls or controls contained within the currently selected 
  634. control. 
  635.  
  636. Note:  In the case of the Show controls button, it operates on the group of 
  637. currently hidden controls. 
  638.  
  639. The set of functions available through the group window is also available 
  640. through the Group submenu of either the DrDialog window or the pop-up menu. 
  641.  
  642. To learn more about the function of a particular group window button, 
  643. double-click on the image of the button displayed in the other window. 
  644.  
  645.  
  646. ΓòÉΓòÉΓòÉ 4.9.1. Left align controls ΓòÉΓòÉΓòÉ
  647.  
  648. Clicking the left align button aligns all currently selected controls flush 
  649. with the left edge of the current active control. 
  650.  
  651. For example, before: 
  652.  
  653. and after: 
  654.  
  655. If only one control is selected, and it is a container control, all the 
  656. controls it contains are aligned with the left margin of the container. The 
  657. left margin of the container is inset from the left edge of the control by an 
  658. amount dependent upon the type of container control. 
  659.  
  660. For example, before: 
  661.  
  662. and after: 
  663.  
  664.  
  665. ΓòÉΓòÉΓòÉ 4.9.2. Bottom align controls ΓòÉΓòÉΓòÉ
  666.  
  667. Clicking the bottom align button aligns all currently selected controls flush 
  668. with the bottom edge of the current active control. 
  669.  
  670. For example, before: 
  671.  
  672. and after: 
  673.  
  674. If only one control is selected, and it is a container control, all the 
  675. controls it contains are aligned with the bottom margin of the container. The 
  676. bottom margin of the container is inset from the bottom edge of the control by 
  677. an amount dependent upon the type of container control. 
  678.  
  679. For example, before: 
  680.  
  681. and after: 
  682.  
  683.  
  684. ΓòÉΓòÉΓòÉ 4.9.3. Right align controls ΓòÉΓòÉΓòÉ
  685.  
  686. Clicking the right align button aligns all currently selected controls flush 
  687. with the right edge of the current active control. 
  688.  
  689. For example, before: 
  690.  
  691. and after: 
  692.  
  693. If only one control is selected, and it is a container control, all the 
  694. controls it contains are aligned with the right margin of the container. The 
  695. right margin of the container is inset from the right edge of the control by an 
  696. amount dependent upon the type of container control. 
  697.  
  698. For example, before: 
  699.  
  700. and after: 
  701.  
  702.  
  703. ΓòÉΓòÉΓòÉ 4.9.4. Top align controls ΓòÉΓòÉΓòÉ
  704.  
  705. Clicking the top align button aligns all currently selected controls flush with 
  706. the top edge of the current active control. 
  707.  
  708. For example, before: 
  709.  
  710. and after: 
  711.  
  712. If only one control is selected, and it is a container control, all the 
  713. controls it contains are aligned with the top margin of the container. The top 
  714. margin of the container is inset from the top edge of the control by an amount 
  715. dependent upon the type of container control. 
  716.  
  717. For example, before: 
  718.  
  719. and after: 
  720.  
  721.  
  722. ΓòÉΓòÉΓòÉ 4.9.5. Horizontally center controls ΓòÉΓòÉΓòÉ
  723.  
  724. Clicking the horizontally center button aligns the horizontal midpoint of all 
  725. currently selected controls with the horizontal midpoint of the current active 
  726. control. 
  727.  
  728. For example, before: 
  729.  
  730. and after: 
  731.  
  732. If only one control is selected, and it is a container control, the horizontal 
  733. midpoints of all controls it contains are aligned with the horizontal midpoint 
  734. of the container. 
  735.  
  736. For example, before: 
  737.  
  738. and after: 
  739.  
  740.  
  741. ΓòÉΓòÉΓòÉ 4.9.6. Vertically center controls ΓòÉΓòÉΓòÉ
  742.  
  743. Clicking the vertically center button aligns the vertical midpoint of all 
  744. currently selected controls with the vertical midpoint of the current active 
  745. control. 
  746.  
  747. For example, before: 
  748.  
  749. and after: 
  750.  
  751. If only one control is selected, and it is a container control, the vertical 
  752. midpoints of all controls it contains are aligned with the vertical midpoint of 
  753. the container. 
  754.  
  755. For example, before: 
  756.  
  757. and after: 
  758.  
  759.  
  760. ΓòÉΓòÉΓòÉ 4.9.7. Horizontally space controls ΓòÉΓòÉΓòÉ
  761.  
  762. Clicking the horizontally space button spaces all currently selected controls 
  763. evenly horizontally. Evenly means that the amount of space between each control 
  764. is the same. 
  765.  
  766. There are three different cases to consider: 
  767.  
  768. Case 1:   There exists a horizontal line that intersects both the active 
  769.           control and at least one other selected control. In this case the 
  770.           leftmost and rightmost controls act as anchors and all the other 
  771.           controls (including the active control) are spaced evenly between 
  772.           them. The spacing will preserve the original relative ordering 
  773.           between the controls. 
  774.  
  775.           For example, before: 
  776.  
  777.           and after: 
  778.  
  779. Case 2:   There is no horizontal line that intersects both the active control 
  780.           and at least one other selected control. In this case the active 
  781.           control acts as an anchor and all the other controls are spaced 
  782.           evenly between the left and right ends of the active control. The 
  783.           spacing will preserve the original relative ordering between the 
  784.           selected controls. 
  785.  
  786.           For example, before: 
  787.  
  788.           and after: 
  789.  
  790. Case 3:   Only one control is selected, and it is a container control. In this 
  791.           case, all the controls inside of the container are spaced evenly 
  792.           between the left and right margins of the container. The left and 
  793.           right margins of the container are inset from the left and right 
  794.           edges of the container by an amount dependent upon the type of 
  795.           container control. Note that the spacing is performed separately for 
  796.           each group of vertically aligned controls within the container. While 
  797.           this may sound complicated, it actually facilitates the rapid 
  798.           alignment of arrays of controls within a container (try it, you'll 
  799.           like it!). 
  800.  
  801.           For example, before: 
  802.  
  803.           and after: 
  804.  
  805.  
  806. ΓòÉΓòÉΓòÉ 4.9.8. Vertically space controls ΓòÉΓòÉΓòÉ
  807.  
  808. Clicking the vertically space button spaces all currently selected controls 
  809. evenly vertically. Evenly means that the amount of space between each control 
  810. is the same. 
  811.  
  812. There are three different cases to consider: 
  813.  
  814. Case 1:   There exists a vertical line that intersects both the active control 
  815.           and at least one other selected control. In this case the topmost and 
  816.           bottommost controls act as anchors and all the other controls 
  817.           (including the active control) are spaced evenly between them. The 
  818.           spacing will preserve the original relative ordering between the 
  819.           controls. 
  820.  
  821.           For example, before: 
  822.  
  823.           and after: 
  824.  
  825. Case 2:   There is no vertical line that intersects both the active control and 
  826.           at least one other selected control. In this case the active control 
  827.           acts as an anchor and all the other controls are spaced evenly 
  828.           between the top and bottom ends of the active control. The spacing 
  829.           will preserve the original relative ordering between the selected 
  830.           controls. 
  831.  
  832.           For example, before: 
  833.  
  834.           and after: 
  835.  
  836. Case 3:   Only one control is selected, and it is a container control. In this 
  837.           case, all the controls inside of the container are spaced evenly 
  838.           between the top and bottom margins of the container. The top and 
  839.           bottom margins of the container are inset from the top and bottom 
  840.           edges of the container by an amount dependent upon the type of 
  841.           container control. Note that the spacing is performed separately for 
  842.           each group of horizontally aligned controls within the container. 
  843.           While this may sound complicated, it actually facilitates the rapid 
  844.           alignment of arrays of controls within a container (try it, you'll 
  845.           like it!). 
  846.  
  847.           For example, before: 
  848.  
  849.           and after: 
  850.  
  851.  
  852. ΓòÉΓòÉΓòÉ 4.9.9. Equal width controls ΓòÉΓòÉΓòÉ
  853.  
  854. Clicking the equal width button makes all currently selected controls the same 
  855. width as the current active control. 
  856.  
  857. For example, before: 
  858.  
  859. and after: 
  860.  
  861. If only one control is selected, and it is a container control, all the 
  862. controls it contains are made the same width as the distance between the left 
  863. and right margins of the container control. The left and right margins of the 
  864. container are inset from the left and right edges of the control by an amount 
  865. dependent upon the type of container control. 
  866.  
  867. For example, before: 
  868.  
  869. and after: 
  870.  
  871.  
  872. ΓòÉΓòÉΓòÉ 4.9.10. Equal height controls ΓòÉΓòÉΓòÉ
  873.  
  874. Clicking the equal height button makes all currently selected controls the same 
  875. height as the current active control. 
  876.  
  877. For example, before: 
  878.  
  879. and after: 
  880.  
  881. If only one control is selected, and it is a container control, all the 
  882. controls it contains are made the same height as the distance between the top 
  883. and bottom margins of the container control. The top and bottom margins of the 
  884. container are inset from the top and bottom edges of the control by an amount 
  885. dependent upon the type of container control. 
  886.  
  887. For example, before: 
  888.  
  889. and after: 
  890.  
  891.  
  892. ΓòÉΓòÉΓòÉ 4.9.11. Same style controls ΓòÉΓòÉΓòÉ
  893.  
  894. Clicking the same style button makes all currently selected controls have the 
  895. same attributes as the current active control. 
  896.  
  897. The attribute information copied from the active control to each selected 
  898. control consists of: 
  899.  
  900. o Color 
  901. o Font 
  902. o Style (as set in the active control's pop-up style dialog) 
  903.  
  904. Note:  The style information is copied to a selected control only if it is the 
  905. same type of control as the active control. The color and font information is 
  906. copied to a selected control only if the selected control can accept it. 
  907.  
  908. For example, before: 
  909.  
  910. and after: 
  911.  
  912.  
  913. ΓòÉΓòÉΓòÉ 4.9.12. Hide controls ΓòÉΓòÉΓòÉ
  914.  
  915. Clicking the hide button hides the currently selected controls in the edit 
  916. dialog. Note that the controls are not deleted, but are simply hidden. This can 
  917. be useful if you are trying to operate on a control which is being obscured by 
  918. other controls in front of it. 
  919.  
  920. All hidden controls can be made visible again by clicking on the button. 
  921.  
  922. Note:  If the currently selected control is the dialog itself, the entire 
  923. dialog is hidden. To make it visible again, it must be selected for editing 
  924. using the Dialog select window. 
  925.  
  926.  
  927. ΓòÉΓòÉΓòÉ 4.9.13. Show controls ΓòÉΓòÉΓòÉ
  928.  
  929. Clicking the show button shows all controls within the current edit dialog that 
  930. were previously hidden using the button. 
  931.  
  932.  
  933. ΓòÉΓòÉΓòÉ 4.9.14. Delete controls ΓòÉΓòÉΓòÉ
  934.  
  935. Clicking the delete button deletes the currently selected controls from the 
  936. edit dialog. If no controls are currently selected, no action is taken. If the 
  937. dialog itself is selected, you will be prompted whether you wish to delete the 
  938. entire dialog or not. 
  939.  
  940. Pressing the Del key on the keyboard while the current edit dialog has the 
  941. focus also has the same effect as pressing the delete button. 
  942.  
  943.  
  944. ΓòÉΓòÉΓòÉ 4.10. Size window ΓòÉΓòÉΓòÉ
  945.  
  946.  
  947. ΓòÉΓòÉΓòÉ <hidden> Size window ΓòÉΓòÉΓòÉ
  948.  
  949. The size window displays the location and size of the currently active control. 
  950. The location displayed is of the lower-left corner of the control. 
  951.  
  952. You can specify the units as either pels or dialog units by checking the 
  953. appropriate radio button. 
  954.  
  955. You can also change the location and/or size of the control by editing the 
  956. contents of the appropriate fields and either pressing Enter or clicking on the 
  957. OK button. 
  958.  
  959. Clicking the Cancel button will copy the active control's current location and 
  960. size information back into the entry fields, discarding any changes you may 
  961. have made. 
  962.  
  963. If no control is active, the size window will be disabled. 
  964.  
  965.  
  966. ΓòÉΓòÉΓòÉ 4.11. ID window ΓòÉΓòÉΓòÉ
  967.  
  968.  
  969. ΓòÉΓòÉΓòÉ <hidden> ID window ΓòÉΓòÉΓòÉ
  970.  
  971. Selecting the ID tool modifies the display of all dialogs being edited to show 
  972. information about each control instead of the image of each control. The 
  973. resulting display will look something like the following: 
  974.  
  975. Container controls are shown in yellow, and all other controls are shown in 
  976. white. 
  977.  
  978. All normal editing actions (e.g. moving, sizing, changing view mode) are still 
  979. available while the ID tool is active. All edit dialogs will return to their 
  980. normal display mode when the ID tool window is closed. 
  981.  
  982. The check boxes in the ID tool window specify what information is to be 
  983. displayed within each control. The choices are: 
  984.  
  985. Lower-left 
  986.           Display the coordinate of the lower-left corner of the control in the 
  987.           lower-left corner of the control. 
  988. Upper-right 
  989.           Display the coordinate of the upper-right corner of the control in 
  990.           the upper-right corner of the control. 
  991. Width 
  992.           Display the width of the control in square brackets in the center of 
  993.           the control. 
  994. Height 
  995.           Display the height of the control in square brackets in the center of 
  996.           the control. 
  997. Name 
  998.           Display the name of the control in the center of the control. 
  999. ID 
  1000.           Display the ID of the control in the center of the control. 
  1001.  
  1002. If both width and height are checked, they are displayed in the form: 
  1003. [width,height]. 
  1004.  
  1005. If both name and ID are checked, they are shown in the form: name=ID. 
  1006.  
  1007. If there is not enough room in a particular control to display all of the 
  1008. requested information, only the information that will fit is displayed. The 
  1009. information is prioritized so that lower priority information is removed first. 
  1010. From high to low, the priority order is as follows: 
  1011.  
  1012. o ID 
  1013. o Name 
  1014. o Width/Height 
  1015. o Lower-left 
  1016. o Upper-right 
  1017.  
  1018.  
  1019. ΓòÉΓòÉΓòÉ 4.12. Name window ΓòÉΓòÉΓòÉ
  1020.  
  1021.  
  1022. ΓòÉΓòÉΓòÉ <hidden> Name window ΓòÉΓòÉΓòÉ
  1023.  
  1024. The name window lists the ID and optional name of each control in the edit 
  1025. dialog, including the dialog itself. The name window is actually the first page 
  1026. in the Events section of the DrRexx notebook. The list box displays each 
  1027. control in the form: ID = name [type] (count*), where name is optional, type is 
  1028. the type of control (e.g. PUSHBUTTON), and count is the number of controls in 
  1029. the resource file with the same ID. If a '*' is present after count, it 
  1030. indicates that one or more control specific REXX handlers have been written for 
  1031. the control. 
  1032.  
  1033. The currently active control (if any) is always selected in the list box. 
  1034. Selecting a new entry in the list box will also select a new active control in 
  1035. the edit dialog. The name and ID of the active control can also be changed by 
  1036. editing the values in the two entry fields at the top of the name window and 
  1037. then pressing Enter to make the change. 
  1038.  
  1039. Note:  ID's must be unique within a dialog. Names must be unique within a 
  1040. resource file. If you enter a non-unique name, the editor will automatically 
  1041. append a numerical suffix to make it unique. If you enter a non-unique ID, the 
  1042. editor will automatically replace it by the next available unique ID. 
  1043.  
  1044. If you enter an ID used in a different dialog, and the name field is blank, the 
  1045. control will be assigned whatever name is currently attached to the ID in the 
  1046. other dialog. If the name field is not blank, all controls with the same ID 
  1047. will be assigned the new name. 
  1048.  
  1049. The name and ID of a control can also be set using the Name... and ID... 
  1050. options of the pop-up menu. 
  1051.  
  1052.  
  1053. ΓòÉΓòÉΓòÉ 4.13. Text window ΓòÉΓòÉΓòÉ
  1054.  
  1055.  
  1056. ΓòÉΓòÉΓòÉ <hidden> Text window ΓòÉΓòÉΓòÉ
  1057.  
  1058. The text window allows you to specify the window text and font for the 
  1059. currently active control. When a control is made active, its current window 
  1060. text and font information is copied to the edit fields of the text window. 
  1061.  
  1062. To change the control's window text, edit the entry field and press Enter or 
  1063. click on the OK button. 
  1064.  
  1065. To change the control's font: 
  1066.  
  1067. o Select the font family from the drop-down list in the middle 
  1068. o Select the point size using the spin button on the left 
  1069. o Select the style (i.e. normal, bold, italic or bold italic) using the style 
  1070.   buttons on the right 
  1071. o Click the OK button or press Enter to make the font change. 
  1072.  
  1073. Clicking the Cancel button will copy the active control's current window text 
  1074. and font information back into the text tool's edit fields, discarding any 
  1075. changes you may have made. 
  1076.  
  1077. Clicking the Paste button will copy the current contents of the clipboard into 
  1078. the entry field and also make it the control's new window text. If no text is 
  1079. in the clipboard, the editor will beep. 
  1080.  
  1081. If no control is active, or the active control does not have a text field, the 
  1082. text window will be disabled. 
  1083.  
  1084. If the active control has text, but no font information, the font selection 
  1085. controls will be disabled. 
  1086.  
  1087. The text and font of a control can also be set using the Text... and Font... 
  1088. options of the pop-up menu. 
  1089.  
  1090.  
  1091. ΓòÉΓòÉΓòÉ 4.14. Color window ΓòÉΓòÉΓòÉ
  1092.  
  1093.  
  1094. ΓòÉΓòÉΓòÉ <hidden> Color window ΓòÉΓòÉΓòÉ
  1095.  
  1096. The color window allows you to specify the colors to use for the current active 
  1097. control. When a control is made active, its list of color attributes and color 
  1098. information is copied to the edit fields of the color window. 
  1099.  
  1100. To change the active control's colors: 
  1101.  
  1102. o Select an attribute from the list of color attributes defined for the active 
  1103.   control (e.g. Background color). The color palette will be updated to show 
  1104.   the color currently being used for that attribute (if it is known). 
  1105. o Select a new color from the palette of available colors 
  1106.  
  1107. To restore the active control's colors back to their default values, click the 
  1108. Default button. To restore the active control's colors back to the values they 
  1109. had when the control was first selected, click the Original button. 
  1110.  
  1111. Note:  Not all control types have the same color attributes. Some control types 
  1112. do not have any defined color attributes (e.g. ICONBUTTON). If a control with 
  1113. no color attributes is made active, the color tool is disabled. 
  1114.  
  1115. Normally the color tool displays a color palette consisting of 16 default 
  1116. colors. However, if the color tool is sized large enough vertically, an 
  1117. additional 40 colors are added to the palette (for a total of 56 colors). The 
  1118. new colors are the colors used by PM to draw specific display items (e.g. 
  1119. Window static text), and correspond to the colors that can be specified using 
  1120. the system scheme editor. If you select colors from this extended portion of 
  1121. the color palette, your controls will automatically use whatever color is in 
  1122. effect for that particular logical color. That is, if another user's color 
  1123. scheme is different than yours, your controls will automatically use the color 
  1124. scheme in effect for that user when your dialog is displayed on that user's 
  1125. system). 
  1126.  
  1127. The text control located below the color palette displays the name of the color 
  1128. currently being pointed at, and can be used to locate a particular logical 
  1129. color in the palette. 
  1130.  
  1131. When used in conjunction with the same style tool, the color tool can be used 
  1132. to set the colors for an entire group of controls quickly and easily: 
  1133.  
  1134. o First, select the group of controls whose colors are to be set. 
  1135. o Second, use the color tool to set the colors for the active control in the 
  1136.   group. 
  1137. o Finally, click the button to copy the color information from the active 
  1138.   control to all other selected controls in the group. 
  1139.  
  1140. Note:  The size of the color tool, and hence the number of colors displayed in 
  1141. the palette, is a user preference item and is automatically saved acrooss 
  1142. DrDialog sessions. 
  1143.  
  1144. The foreground and background colors of a control can also be set using the 
  1145. Colors... option of the pop-up menu. 
  1146.  
  1147.  
  1148. ΓòÉΓòÉΓòÉ 4.15. DrRexx window ΓòÉΓòÉΓòÉ
  1149.  
  1150.  
  1151. ΓòÉΓòÉΓòÉ <hidden> DrRexx window ΓòÉΓòÉΓòÉ
  1152.  
  1153. The DrRexx window is actually a notebook with several major sections: 
  1154.  
  1155. o REXX event handlers for each defined control 
  1156.  
  1157. o REXX procedures defined globally for the current resource file 
  1158.  
  1159. o A notepad of REXX code fragments or other useful pieces of information 
  1160.  
  1161. For more detailed information on the use of the DrRexx notebook, refer to the 
  1162. DrRexx section. 
  1163.  
  1164. For more information on the events defined for each type of control, refer to 
  1165. the controls section. 
  1166.  
  1167.  
  1168. ΓòÉΓòÉΓòÉ 4.16. Drop-down menu window ΓòÉΓòÉΓòÉ
  1169.  
  1170.  
  1171. ΓòÉΓòÉΓòÉ <hidden> Drop-down menu window ΓòÉΓòÉΓòÉ
  1172.  
  1173. The drop-down menu editor window allows you to define and edit the contents and 
  1174. actions for the drop-down menu, if any, associated with the current dialog. 
  1175.  
  1176. The drop-down menu editor uses a series of listboxes to display the structure 
  1177. of the drop-down menu being edited. It also displays a version of the actual 
  1178. menu at the top of the editor window so you can verify that the menu has the 
  1179. desired structure and appearance. 
  1180.  
  1181. The left-most menu editor listbox displays the items at the top-most level of 
  1182. the drop-down menu structure (i.e. the items on the menu bar). Only submenus 
  1183. can be added to the menu bar. 
  1184.  
  1185. The middle listbox displays the menu items for the drop-down menu currently 
  1186. selected in the left-most listbox, while the right-most listbox displays the 
  1187. menu items for the submenu currently selected in the middle listbox. If the 
  1188. left-most or middle listboxes do not have a submenu selected, then no items are 
  1189. listed in the middle or right-most listbox respectively. 
  1190.  
  1191. The menu item currently being edited is always the right-most selected entry 
  1192. within the three listboxes. 
  1193.  
  1194. Note:  The topmost entry in each listbox is always _1st_. This entry is not an 
  1195. actual menu item, and so cannot be modified. Its purpose is to provide a way of 
  1196. inserting a menu item as the first entry in a menu bar or submenu. 
  1197.  
  1198. There are three types of entries that can be inserted into a drop-down menu 
  1199. structure: 
  1200.  
  1201. o Menu item 
  1202. o submenu 
  1203. o Separator 
  1204.  
  1205. A menu item can be either selectable or non-selectable (i.e. static). A menu 
  1206. item is selectable if it has some REXX code associated with it. The REXX code 
  1207. associated with a menu item is entered into the Action multi-line edit control. 
  1208. If a menu item has no REXX code associated with it, then it is static and 
  1209. cannot be selected. 
  1210.  
  1211. A submenu defines the entry point to a submenu. It has no REXX code associated 
  1212. with it, but is selectable (selecting it causes its submenu to be displayed). 
  1213.  
  1214. A separator is simply a horizontal bar that separates other menu items. It has 
  1215. no REXX code associated with it and it cannot be selected. 
  1216.  
  1217. Initially, a dialog has no drop-down menu. All of the listboxes are empty 
  1218. except for the left-most, which has a _1st_ entry. The only type of menu entry 
  1219. that can be added to the top-level of a drop-down menu is a submenu. 
  1220.  
  1221. To create a new submenu: 
  1222.  
  1223. o Select the entry in the listbox you want the submenu inserted after 
  1224.   (initially this can only be the _1st_ entry). 
  1225. o Type the text describing the submenu into the Text field. 
  1226.  
  1227.   Note:  A "~" character preceding a character in the text defines that 
  1228.   character as a keyboard accelerator for that menu entry. 
  1229. o Enter an optional label for the submenu entry into the Label field. Labels 
  1230.   are used to identify menu entries when using the DrRexx menu functions. 
  1231.  
  1232.   Note:  Menu labels need not be unique within a drop-down menu. A menu 
  1233.   function applied to a particular label operates on all menu items with that 
  1234.   label. 
  1235. o Set the Check and Disabled check boxes to indicate the desired initial state 
  1236.   of the submenu entry (i.e. checked or not checked, disabled or not disabled). 
  1237. o Click the submenu button to insert the submenu entry into the drop-down menu 
  1238.   after the currently selected menu entry. 
  1239.  
  1240. The process for inserting menu items or separators is very similar. 
  1241.  
  1242. To insert a new menu item: 
  1243.  
  1244. o Select the entry in the listbox you want the menu item inserted after. Menu 
  1245.   items can only be inserted after menu entries in the middle or right-most 
  1246.   listbox. 
  1247. o Type the text describing the menu item into the Text field. 
  1248.  
  1249.   Note:  A "~" character preceding a character in the text defines that 
  1250.   character as a keyboard accelerator for that menu entry. 
  1251. o Enter an optional label for the menu item into the Label field. See the 
  1252.   previous description of inserting submenus for an explanation of the use of 
  1253.   labels. 
  1254. o Set the Check and Disabled check boxes to indicate the desired initial state 
  1255.   of the menu item (i.e. checked or not checked, disabled or not disabled). 
  1256. o Enter the REXX code to be executed when the menu item is selected into the 
  1257.   Action multi-line edit control. If no REXX code is entered, the menu item 
  1258.   will be static (i.e. non-selectable). 
  1259. o Click the Menu Item button to insert the menu item into the drop-down menu 
  1260.   after the currently selected menu entry. 
  1261.  
  1262. To insert a new separator: 
  1263.  
  1264. o Select the entry in the listbox you want the separator inserted after. 
  1265.   Separators can only be inserted after menu entries in the middle or 
  1266.   right-most listbox. 
  1267. o Click the Separator button to insert the separator into the drop-down menu 
  1268.   after the currently selected menu entry. 
  1269.  
  1270. Once a menu entry has been added to the drop-down menu, it can modified or 
  1271. deleted. 
  1272.  
  1273. To modify an existing menu entry: 
  1274.  
  1275. o Select the entry to be modified in the appropriate listbox. 
  1276.  
  1277.   Note:  In the case of a second or third level menu entry, this may require 
  1278.   selecting its parent submenus first. You can also back up to an already 
  1279.   selected parent submenu by double-clicking its listbox entry. 
  1280.  
  1281.   The Text, Label, Action, Checked and Disabled fields will be updated to 
  1282.   reflect the current values for the selected menu entry. 
  1283.  
  1284.   Alternatively, if the desired entry is a menu item, it can be selected 
  1285.   directly from the actual version of the menu at the top of the menu editor 
  1286.   window. 
  1287. o Change the Text, Label, Action, Checked and Disabled fields to reflect their 
  1288.   new values. 
  1289. o Click the Replace button to make the changes to the menu entry. 
  1290.   Alternatively, you can simply select another menu entry; the previously 
  1291.   selected menu entry will automatically be updated with the values of the 
  1292.   Text, Label, Action, Checked and Disabled fields prior to displaying the new 
  1293.   menu entry's values. 
  1294.  
  1295. To delete an existing menu entry: 
  1296.  
  1297. o Select the entry to be deleted (see the previous description of modifying 
  1298.   menu entries for more information on how to do this). 
  1299. o Click the Delete button to delete the menu entry. 
  1300.  
  1301. To correct an editing error: 
  1302.  
  1303. o Click the Cancel button and the Text, Label, Action, Checked and Disabled 
  1304.   fields will be restored to their last saved values. 
  1305.  
  1306.  
  1307. ΓòÉΓòÉΓòÉ 4.17. Run-time window ΓòÉΓòÉΓòÉ
  1308.  
  1309.  
  1310. ΓòÉΓòÉΓòÉ <hidden> Run-time window ΓòÉΓòÉΓòÉ
  1311.  
  1312. The run-time window allows you to run the DrRexx application currently being 
  1313. edited under control of the editor. 
  1314.  
  1315. DrDialog operates in one of two modes: edit mode or run mode. In edit mode you 
  1316. can freely make changes to any of the dialogs contained in the current resource 
  1317. file. This is the mode in which most of the DrDialog tools operate. 
  1318.  
  1319. Using the run-time window, you can tell the editor to enter run mode. In run 
  1320. mode, all of the editing functions of the editor are disabled so that you can 
  1321. test the actual behavior of the your application. 
  1322.  
  1323. Run mode is entered by clicking the button in the run-time window. When you do 
  1324. this several things happen: 
  1325.  
  1326. o All editing tool windows are hidden, including the current dialog being 
  1327.   edited. 
  1328.  
  1329. o All of the controls in the run-time window are enabled. 
  1330.  
  1331. o Your DrRexx application is started. 
  1332.  
  1333. You can stop execution of your DrRexx application at any time by clicking on 
  1334. the button (which replaces the button when you enter run mode. 
  1335.  
  1336. While you are in run mode, your application behaves exactly the way it would 
  1337. when running outside of the DrDialog environment (i.e. when running under 
  1338. control of the stand-alone DrRexx environment). In addition, you can use the 
  1339. various tools of the run-time window to help you debug your application. For 
  1340. more information on the function of the various run-time window tools, 
  1341. double-click on the appropriate areas of the figure to the left. 
  1342.  
  1343. If your application requires command line arguments, you can specify them by 
  1344. entering them into the entry field of the run-time window prior to starting 
  1345. execution of your application. Alternatively, if you have previously entered 
  1346. the arguments, you can also select them into the entry field using the 
  1347. drop-down list. Whatever text is in the entry field when the application begins 
  1348. execution is passed to it as its command line arguments. 
  1349.  
  1350. Note:  If you wish, you can have DrDialog automatically save the current set of 
  1351. dialogs you are editing to a file each time you click the button. This can 
  1352. prevent you from losing editing changes if your application causes DrDialog to 
  1353. crash (e.g. your application calls an external function with invalid 
  1354. arguments). 
  1355.  
  1356. To enable this feature, first select Options... from the Options submenu of the 
  1357. DrDialog menu bar. Then check the Save before running program check box in the 
  1358. Auto save section of the dialog that appears. You may also specify the name of 
  1359. the file to save the current set of dialogs in before running your program. If 
  1360. you do not specify a file name, the dialogs will be saved in the same file they 
  1361. would have been saved in if you had selected the Save option from the File 
  1362. submenu of the DrDialog menu bar. 
  1363.  
  1364.  
  1365. ΓòÉΓòÉΓòÉ 4.18. Dialog select window ΓòÉΓòÉΓòÉ
  1366.  
  1367.  
  1368. ΓòÉΓòÉΓòÉ <hidden> Dialog select window ΓòÉΓòÉΓòÉ
  1369.  
  1370. The dialog select window lists the ID and optional name of each dialog in the 
  1371. current resource file being edited. The list box displays each dialog in the 
  1372. form: ID = name, where name is optional. 
  1373.  
  1374. Double clicking an entry in the list box selects the corresponding dialog for 
  1375. editing. Double clicking the --- new --- entry at the top of the list box 
  1376. creates a new, empty dialog. 
  1377.  
  1378. Note:  A dialog can be given a symbolic name by selecting the dialog for 
  1379. editing and either changing its entry in the name window or by using the 
  1380. Name... option of the pop-up menu. 
  1381.  
  1382.  
  1383. ΓòÉΓòÉΓòÉ 5. Background window ΓòÉΓòÉΓòÉ
  1384.  
  1385. The background window is a backdrop for all other DrDialog windows. It can be 
  1386. made full screen to separate DrDialog's windows from all other application 
  1387. windows; or it can be made small to allow quick access to other applications on 
  1388. the desktop. 
  1389.  
  1390. The background window also allows DrDialog to be minimized if desired. 
  1391.  
  1392. At the top of the background window is the DrDialog menu bar. The menu bar 
  1393. provides access to the following editor functions: 
  1394.  
  1395. File      This submenu provides options for loading and saving new or existing 
  1396.           resource files 
  1397.  
  1398. Tools     This submenu provides access to the same set of editor tools 
  1399.           available through the Tools window and the Tools submenu of the 
  1400.           pop-up menu. 
  1401.  
  1402. Controls  This submenu allows any DrDialog control type to be added to the 
  1403.           current edit dialog. It provides the same palette of controls 
  1404.           available through the Controls window and Controls submenu of the 
  1405.           pop-up menu. 
  1406.  
  1407. Group     This submenu provides access to the same set of group manipulation 
  1408.           tools available through the Group window and the Group submenu of the 
  1409.           pop-up menu. 
  1410.  
  1411. At the bottom of the background window are two controls that describe the 
  1412. DrDialog window and control currently pointed at. The leftmost control gives a 
  1413. brief description of the window the pointer is currently in, while the 
  1414. rightmost control describes the function of the control the pointer is 
  1415. currently over. If the pointer is over an edit dialog, the rightmost control 
  1416. displays the ID number, name and type of the control pointed at in the form: ID 
  1417. = name [type], while the leftmost control identifies the edit dialog as being 
  1418. active or inactive. Both controls are automatically updated as you move the 
  1419. pointer around the screen. 
  1420.  
  1421. The design displayed in the background window is user selectable. To change it, 
  1422. click button 2 while the pointer is anywhere over the current background window 
  1423. pattern. A pop-up window will appear displaying a list of available background 
  1424. patterns. Scroll through the list until an interesting design appears, then 
  1425. click on it with button 1 to make it the new background. If you are not 
  1426. satisfied with the result, you may scroll through the list and select another 
  1427. design. 
  1428.  
  1429. If the background pattern you would like to use is in a separate .DLL or .BMP 
  1430. file, you may also type its name into the entry field at the top of the dialog, 
  1431. then click the Set button to make it the new background pattern. For a bitmap 
  1432. in a .DLL, the name should be of the form: dllName:#resourceId (e.g. 
  1433. MYBMPS:#4). For a bitmap in a .BMP file, simply type in the complete file name 
  1434. (e.g. C:\MYBMPS\MYCAT.BMP). Note that the file extension must be .BMP. 
  1435.  
  1436. Once you are satisfied with the background pattern, you may close the pattern 
  1437. pop-up window using its system menu. 
  1438.  
  1439. The size, position and pattern for the background window is saved as part of 
  1440. the user preferences for DrDialog. 
  1441.  
  1442.  
  1443. ΓòÉΓòÉΓòÉ 6. Managing your DrDialog workspace ΓòÉΓòÉΓòÉ
  1444.  
  1445. Because of the many tools provided by DrDialog, your desktop (workshop?) can 
  1446. easily become cluttered with windows. To help control this clutter, DrDialog 
  1447. provides several ways for you to organize and manage your tool windows: 
  1448.  
  1449. o Use the pop-up menu or DrDialog menu bar whenever possible. The pop-up menu 
  1450.   especially provides quick access to most editor functions, and any dialogs it 
  1451.   displays are popped up near the pointer and are removed automatically as soon 
  1452.   as you are done using them. 
  1453.  
  1454. o DrDialog automatically remembers the position and size of each tool window. 
  1455.   Each time a tool is invoked, it will appear at the same location and with the 
  1456.   same size it had the last time you used it. 
  1457.  
  1458. o Tool windows can be opened automatically at the beginning of each editor 
  1459.   session if desired. The system menu of each tool window contains an Auto open 
  1460.   option. If this option is checked, the associated tool window will 
  1461.   automatically be opened at the start of each edit session if the Auto hide 
  1462.   option for the window is not checked. If the option is not checked, or the 
  1463.   Auto hide option is checked, the window will not be opened until requested. 
  1464.   To change the current setting of the Auto open option, simply select it from 
  1465.   the tool's system menu. The setting is automatically remembered across 
  1466.   editing sessions and so only needs to be set once. 
  1467.  
  1468. o Tools can automatically be hidden when they are not being used. The system 
  1469.   menu of each tool window contains an Auto hide option. If this option is 
  1470.   checked, the associated window is hidden whenever another tool window or the 
  1471.   background window is selected, or the pop-up menu is displayed. If this 
  1472.   option is not checked, the tool window is left visible until explictly 
  1473.   closed. To change the current setting of the Auto hide option, simply select 
  1474.   it from the tool's system menu. The setting is automatically remembered 
  1475.   across editing sessions and so only needs to be set once. 
  1476.  
  1477.   Note:  Selecting an edit dialog will not cause a tool window to be hidden, 
  1478.   even if Auto hide is active for the tool. The tool window will only be hidden 
  1479.   if another tool window or the background window is selected, or the pop-up 
  1480.   menu is displayed. 
  1481.  
  1482.   A tool window that has been automatically hidden can be redisplayed simply by 
  1483.   clicking its corresponding button either in the tools window or the Tools 
  1484.   submenu of the DrDialog menu bar or pop-up menu. 
  1485.  
  1486. o Tools can either float above the dialog being edited or drift to the bottom 
  1487.   of the window stack. If the Float option of a tool's system menu is checked, 
  1488.   the tool window will always float above the dialog currently being edited, 
  1489.   even if the edit dialog is given the focus. If the Float option is not 
  1490.   checked, the tool window will drop behind the current edit dialog whenever 
  1491.   the edit dialog receives the input focus. To change the current setting of 
  1492.   the Float option, simply select it from the tool's system menu. The setting 
  1493.   is automatically remembered across editing sessions and so only needs to be 
  1494.   set once. 
  1495.  
  1496.  
  1497. ΓòÉΓòÉΓòÉ 7. Invoking DrDialog ΓòÉΓòÉΓòÉ
  1498.  
  1499. The syntax for invoking DrDialog is: 
  1500.  
  1501.     DrDialog [ -p[iniPath] ] [ resourceFile ]
  1502.  
  1503. where: 
  1504.  
  1505. iniPath         Optional path name used to locate the DRDIALOG.INI user 
  1506.                 preference profile 
  1507.  
  1508. resourceFile    Optional name of a .RES resource file to be loaded into the 
  1509.                 editor at startup. If the file name contains special characters 
  1510.                 (e.g. blanks) it should be enclosed in double quotes (e.g. "My 
  1511.                 Application Dialogs"). 
  1512.  
  1513. If the -p option is not specified, the editor will check to see if the system 
  1514. profile contains the path name to use for locating your user preference 
  1515. profile. If it does, the specified path name is used. If it does not, you will 
  1516. be prompted to enter the path name (i.e. directory) where DrDialog should keep 
  1517. its user preference profile (DRDIALOG.INI). Once you enter the path name, it 
  1518. will be stored in the system profile so that future invocations of DrDialog 
  1519. will not prompt you for the path name. 
  1520.  
  1521. Note:  If -p is specified with no path following it, the current path stored in 
  1522. the system profile will be deleted. You will then be prompted to enter the new 
  1523. path name to store in the system profile. This case is useful if you re-install 
  1524. or move the DrDialog files to a different drive or directory and want to change 
  1525. the default location of the DrDialog user preference profile. 
  1526.  
  1527. If resourceFile is specified, the editor will attempt to load the specified 
  1528. dialog at startup. If resourceFile is not specified, the editor will initially 
  1529. display an empty dialog with the same size and position as the last dialog 
  1530. edited. 
  1531.  
  1532. The first time DrDialog is run, the DrDialog logo screen will also be 
  1533. displayed. From this screen you can either continue into the editor or display 
  1534. the on-line help. The logo will only be displayed automatically the first time 
  1535. DrDialog is run. It can be also be displayed any time the editor is running by 
  1536. clicking on the about button either in the tools window. or the Tools submenu 
  1537. of the DrDialog menu bar or pop-up menu. 
  1538.  
  1539.  
  1540. ΓòÉΓòÉΓòÉ 8. DrDialog and the Workplace Shell ΓòÉΓòÉΓòÉ
  1541.  
  1542. DrDialog supports the OS/2 Workplace Shell as follows: 
  1543.  
  1544. o Resource files that have been edited with DrDialog but which have no DrRexx 
  1545.   code associated with them will appear in a folder with the DrDialog data file 
  1546.   icon: 
  1547.  
  1548.   Double clicking the icon will invoke DrDialog on the specified resource file. 
  1549.   Dragging and dropping the icon on the DrDialog icon will have same effect. 
  1550.  
  1551. o Resource files that have been edited with DrDialog and which have DrRexx code 
  1552.   associated with them will appear in a folder with the DrRexx data file icon: 
  1553.  
  1554.   Double clicking the icon will invoke DrRexx on the specified resource file 
  1555.   (i.e. will run the application). Dragging and dropping the icon on the DrRexx 
  1556.   icon will have same effect. Dragging and dropping the icon on the DrDialog 
  1557.   icon will invoke the editor on the specified resource file. 
  1558.  
  1559. o New, empty DrDialog or DrRexx resource files may be created by dragging and 
  1560.   dropping the DrDialog or DrRexx template icon from the DrDialog folder into 
  1561.   any other folder. 
  1562.  
  1563. DrDialog also includes two simple DrRexx applications: REStoPgm and REStoEXE 
  1564. which can help turn your finished DrRexx application into a drag-and-drop 
  1565. Workplace Shell application or a standard OS/2 executable (i.e. .EXE) file. 
  1566.  
  1567.  
  1568. ΓòÉΓòÉΓòÉ 8.1. REStoPgm ΓòÉΓòÉΓòÉ
  1569.  
  1570. The DrDialog package includes a simple DrRexx application called REStoPgm that 
  1571. turns your finished DrRexx applications into drag-and-drop Workplace Shell 
  1572. applications. 
  1573.  
  1574. To use REStoPgm just drag a DrRexx .RES file that you want to convert and drop 
  1575. it on the REStoPgm icon in the DrDialog folder. REStoPgm will create a new 
  1576. program object in your desktop folder with the same name as your original .RES 
  1577. file minus the .RES extension. Now, drag any file or other object that your 
  1578. DrRexx application can process and drop it on the new program object. Your 
  1579. DrRexx application will be invoked with the file or other object passed as the 
  1580. command line argument (i.e. your program can use PARSE ARG to retrieve it). 
  1581.  
  1582. Of course, once the program object has been created, you are free to move it to 
  1583. a new location or rename it. 
  1584.  
  1585. To demonstrate REStoPgm, try dropping the BmpList.RES icon in the DrDialog 
  1586. SAMPLE folder onto the REStoPgm icon. A program object called BmpList should 
  1587. appear on your desktop. Now try dropping a folder containing some .BMP files 
  1588. onto the new BmpList icon. The BmpList program should appear with all the .BMP 
  1589. files in the folder you dropped on it listed. 
  1590.  
  1591.  
  1592. ΓòÉΓòÉΓòÉ 8.2. REStoEXE ΓòÉΓòÉΓòÉ
  1593.  
  1594. The DrDialog package includes a DrRexx application called REStoEXE that turns 
  1595. your finished DrRexx applications into standard OS/2 executable (i.e. .EXE) 
  1596. files. 
  1597.  
  1598. To use REStoEXE, just drag a DrRexx .RES file that you want to convert and drop 
  1599. it on the REStoEXE icon in the DrDialog folder. REStoEXE will create an 
  1600. executable version of your DrRexx application in the same directory as your 
  1601. .RES file and with the same name except for a .EXE file extension. REStoEXE 
  1602. will also create a new program object in your desktop folder with the same name 
  1603. as your .RES file minus the .RES extension. 
  1604.  
  1605. Once REStoEXE has created the executable version of your program, you can 
  1606. invoke it simply by double-clicking its program icon. If your application 
  1607. accepts a file as its first command line argument, you can also drag any file 
  1608. or other object that your DrRexx application can process and drop it on the new 
  1609. program object. Your DrRexx application will be invoked with the file or other 
  1610. object passed as the command line argument (i.e. your program can use PARSE ARG 
  1611. to retrieve it). 
  1612.  
  1613. Of course, once the program object has been created, you are free to move it to 
  1614. a new location or rename it. 
  1615.  
  1616. To demonstrate REStoEXE, try dropping the BmpList.RES icon in the DrDialog 
  1617. SAMPLE folder onto the REStoEXE icon. A program object called BmpList should 
  1618. appear on your desktop. Now try dropping a folder containing some .BMP files 
  1619. onto the new BmpList icon. The BmpList program should appear with all the .BMP 
  1620. files in the folder you dropped on it listed. 
  1621.  
  1622. Note:  The .EXE file created by REStoEXE is completely self-contained and does 
  1623. not require the DrRexx.EXE program in order to run. 
  1624.  
  1625. Note:  REStoEXE requires that RC (i.e. Resource Compiler) be in your PATH. 
  1626.  
  1627.  
  1628. ΓòÉΓòÉΓòÉ 9. DrRexx ΓòÉΓòÉΓòÉ
  1629.  
  1630. DrRexx is a powerful feature of DrDialog which allows REXX code to be attached 
  1631. to a resource file created by DrDialog. The resulting extended resource file is 
  1632. referred to as a DrRexx application. 
  1633.  
  1634. The REXX code attached to a resource file defines actions associated with 
  1635. events that occur while the DrRexx application is running (e.g. a pushbutton 
  1636. being clicked, or a drop-down menu item being selected). A DrRexx application 
  1637. can either be run stand-alone, using the DrRexx run-time environment 
  1638. (DRREXX.EXE), or under control of the DrDialog editor. The latter is an 
  1639. especially powerful tool since it allows the DrRexx application developer to 
  1640. rapidly and iteratively develop an application by switching back and forth 
  1641. between edit and run mode. 
  1642.  
  1643.  
  1644. ΓòÉΓòÉΓòÉ 9.1. The DrRexx notebook ΓòÉΓòÉΓòÉ
  1645.  
  1646. All DrRexx editing functions are accessed using the DrRexx tool window. The 
  1647. DrRexx window is displayed by clicking on the button in the tools window. The 
  1648. DrRexx window is organized as a notebook with three major sections: 
  1649.  
  1650.           The events section allows editing the REXX event handling code for 
  1651.           the currently active control. 
  1652.           The global procedures section allows editing REXX procedures which 
  1653.           are global to the entire application (i.e. resource file). 
  1654.           The notepad section allows editing common REXX code fragments or 
  1655.           other useful pieces of information 
  1656.  
  1657.  
  1658. ΓòÉΓòÉΓòÉ 9.1.1. Events section ΓòÉΓòÉΓòÉ
  1659.  
  1660.  
  1661. ΓòÉΓòÉΓòÉ <hidden> Events section ΓòÉΓòÉΓòÉ
  1662.  
  1663. The events section of the DrRexx notebook allows you to define REXX routines to 
  1664. handle the various events associated with each control in your application. 
  1665.  
  1666. The cover page of the events section is also called the name tool, and displays 
  1667. a list of all currently defined controls for the dialog being edited. 
  1668. Double-clicking any entry in the list will turn to the subsection of the 
  1669. notebook defining the event handlers for the selected control. The name and 
  1670. numeric ID of the currently selected control can also be changed by editing the 
  1671. corresponding entry fields at the top of the page and pressing Enter. 
  1672.  
  1673. The control events subsection of the DrRexx notebook has a page for each event 
  1674. defined for the currently active control. Selecting the tab for an event will 
  1675. display the REXX code associated with the event in the edit control and allow 
  1676. it to be edited. 
  1677.  
  1678. Note:  From the edit dialog you can also get to a specified page quickly by 
  1679. selecting the matching event name from the Events submenu of the pop-up menu 
  1680. for the control. 
  1681.  
  1682. There are two types of handlers that can be defined for each event: control 
  1683. specific event handlers or class event handlers. 
  1684.  
  1685. A control specific event handler is a handler for an event that is specific to 
  1686. a particular control (e.g. do this action whenever this specific pushbutton is 
  1687. clicked). This is the normal type of event handler. 
  1688.  
  1689. A class event handler is a handler for an event that is generic to the class of 
  1690. the control (e.g. do this action whenever any pushbutton in this dialog is 
  1691. clicked). 
  1692.  
  1693. When an event occurs for a control, the DrRexx run-time environment does the 
  1694. following: 
  1695.  
  1696.  1. If there is a control specific event handler for the event, it invokes that 
  1697.     handler and goes to step 4. 
  1698.  2. If there is a class handler for that event for that kind of control, it 
  1699.     invokes that handler and goes to step 4. 
  1700.  3. If there is a handler for the Any event for the dialog containing the 
  1701.     control, it invokes that handler and goes to step 4. 
  1702.  4. It waits for the next event. 
  1703.  
  1704. The type of handler currently being edited is determined by the state of the 
  1705. spin button located in the lower right hand corner of the event page. If the 
  1706. spin button has Control selected, the control specific handler is being edited. 
  1707. If the spin button has Class selected, the class handler is being edited. 
  1708.  
  1709. Note:  The spin button also has two additional states (Events and Functions) 
  1710. which display different types of help information about the currently selected 
  1711. control. When either of these two items is selected, the information in the 
  1712. edit control is read-only. 
  1713.  
  1714. When Events is selected, the edit control contains a list of the events that 
  1715. are defined for the currently selected control with a brief description of 
  1716. each. 
  1717.  
  1718. When Functions is selected, the edit control contains a list of the window 
  1719. functions that are defined for the currently selected control. 
  1720.  
  1721. The editor indicates which type of handler will handle an event for the 
  1722. currently active control by the trailing character in the page tab for the 
  1723. event. If the trailing character is a '*', then the event will be handled by a 
  1724. control specific event handler. If the trailing character is a '-', then the 
  1725. event will be handled by a class event handler. If neither '*' nor '-' appears 
  1726. as the trailing character in the page tab, neither a control specific nor a 
  1727. class event handler is defined for the event (although the event may still be 
  1728. handled by the Any event handler for the dialog). 
  1729.  
  1730. Note:  There is only one class handler per event for all controls of the same 
  1731. type within a dialog. Editing the class handler for an event in one control 
  1732. changes the class handler for that event in all controls of the same type for 
  1733. that dialog. 
  1734.  
  1735. There is an exception to the above rule in the case of the Init event, which 
  1736. has no class handler. All Init event handlers must be control specific. Any 
  1737. class handler defined for an Init event will be ignored. 
  1738.  
  1739.  
  1740. ΓòÉΓòÉΓòÉ 9.1.2. Global procedures section ΓòÉΓòÉΓòÉ
  1741.  
  1742.  
  1743. ΓòÉΓòÉΓòÉ <hidden> Global procedures section ΓòÉΓòÉΓòÉ
  1744.  
  1745. The global procedures section of the DrRexx notebook allows you to define REXX 
  1746. procedures which can be called from other parts of your DrRexx application. The 
  1747. procedures are global because they can be called from any dialog within the 
  1748. current resource file, not just the one currently being edited. 
  1749.  
  1750. The cover page of the global procedures section displays a list of all 
  1751. currently defined procedures. Double-clicking any entry in the list will turn 
  1752. to the notebook page defining the procedure and allow it to be edited. 
  1753.  
  1754. A new procedure can be added by typing its name into the entry field at the top 
  1755. of the page and pressing Enter. A new, empty page with the name just entered 
  1756. will be added to the section and automatically selected so that you can enter 
  1757. the code for the new procedure. 
  1758.  
  1759. The global procedures section has a page for each global procedure currently 
  1760. defined. Selecting the tab for a procedure will display the REXX code 
  1761. associated with the procedure in the edit control and allow it to be edited. 
  1762.  
  1763. A procedure can be deleted by deleting all its code. The page defining the 
  1764. procedure will automatically be deleted from the notebook when any other page 
  1765. is selected. 
  1766.  
  1767.  
  1768. ΓòÉΓòÉΓòÉ 9.1.3. Notepad section ΓòÉΓòÉΓòÉ
  1769.  
  1770.  
  1771. ΓòÉΓòÉΓòÉ <hidden> Notepad section ΓòÉΓòÉΓòÉ
  1772.  
  1773. The notepad section of the DrRexx notebook allows you to keep track of handy 
  1774. fragments of REXX code or other useful information. For example, many REXX 
  1775. programs make use of the standard RexxUtil functions, and so must include the 
  1776. following lines of REXX code somewhere in the program: 
  1777.  
  1778.    CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  1779.    CALL SysLoadFuncs
  1780.  
  1781. Using the DrRexx notepad, this fragment of code can be assigned a name and 
  1782. always be available for quick inclusion in any DrRexx application. 
  1783.  
  1784. Note:  Information in the DrRexx notepad section is associated with the 
  1785. DrDialog editor, and not with the current resource file being edited. As such, 
  1786. its contents are available in every editing session. As a corollary, nothing in 
  1787. the notepad section is stored as part of a DrRexx application resource file. To 
  1788. include something from the notepad in the application, it must first be copied 
  1789. from the notepad into one of the event or global procedure pages of the DrRexx 
  1790. notebook. 
  1791.  
  1792. The cover page of the notepad section displays a list of the names of all 
  1793. current notes. Double-clicking any entry in the list will turn to the notebook 
  1794. page defining the note and allow it to be edited. 
  1795.  
  1796. A new note can be added by typing its name into the entry field at the top of 
  1797. the page and pressing Enter. A new, empty page with the name just entered will 
  1798. be added to the section and automatically selected so that you can enter the 
  1799. text of the note (i.e. REXX code or other information you wish to keep track 
  1800. of). 
  1801.  
  1802. The notepad section has a page for each note currently defined. Selecting the 
  1803. tab for a note will display the text associated with the note in the edit 
  1804. control and allow it to be edited. 
  1805.  
  1806. A note can be deleted by deleting all its text. The page defining the note will 
  1807. automatically be deleted from the notebook when any other page is selected. 
  1808.  
  1809.  
  1810. ΓòÉΓòÉΓòÉ 9.2. Using the DrRexx editor ΓòÉΓòÉΓòÉ
  1811.  
  1812. All DrRexx notebook pages that allow text to be edited make use of the same set 
  1813. of editing controls. 
  1814.  
  1815. The text to be edited appears in a standard Presentation Manager multi-line 
  1816. edit control. You may use a Workplace Shell Font Palette object to drag and 
  1817. drop the font to use for editing onto the multi-line edit control. You can do 
  1818. the same thing with a Workplace Shell Color Palette object to set the color of 
  1819. the multi-line edit control. Whatever font and color you select will be saved 
  1820. as a user preference item for use in future editing sessions. The default font 
  1821. is the same font currently selected for use by the System Editor. 
  1822.  
  1823. Beneath the edit control is an entry field with a button labeled Find ->. You 
  1824. can enter a string in the entry field and click the find button to search for 
  1825. the next occurrence of the specified string in the text being edited. Searching 
  1826. always starts from the current cursor location. 
  1827.  
  1828. The button labeled <- Switch on the other side of the entry field allows you to 
  1829. switch to any application currently listed on the OS/2 Presentation Manager 
  1830. Window List. Enter the first few characters of the application name as it 
  1831. appears on the Window List into the entry field and click the <- Switch button. 
  1832. If the application is running, it will be brought to the foreground 
  1833. automatically. If the application cannot be found, the system will beep to 
  1834. indicate that it could not switch to the requested application. The text in the 
  1835. entry field at the time the <- Switch button is pressed is saved as a user 
  1836. preference item when DrDialog exits. Its previous value can be retrieved by 
  1837. clicking the <- Switch button with an empty entry field. 
  1838.  
  1839. To the left of the edit control are a column of buttons with the following 
  1840. functions: 
  1841.  
  1842.           Delete the currently selected text and copy it to the clipboard. 
  1843.           Copy the currently selected text to the clipboard. If no text is 
  1844.           selected, the entire contents of the edit control are selected and 
  1845.           then copied to the clipboard. 
  1846.           Replace the currently selected text by the contents of the clipboard. 
  1847.           Save all of the text being edited. 
  1848.           Replace all of the text by the last saved copy of the text (or the 
  1849.           original contents if the save button has not been pressed). 
  1850.  
  1851.  
  1852. ΓòÉΓòÉΓòÉ 9.3. Using your own editor ΓòÉΓòÉΓòÉ
  1853.  
  1854. Not everyone is comfortable using a new or different text editor. Recognizing 
  1855. this, DrDialog allows you to edit the REXX code for your application using your 
  1856. own editor and have the resulting REXX code automatically imported into your 
  1857. DrRexx application. 
  1858.  
  1859. In order to use this feature of DrDialog, you must adhere to the following 
  1860. naming convention: 
  1861.  
  1862. o If the name of your DrRexx application is drive:\path\filename.RES, then the 
  1863.   name of the file containing the associated REXX code must be 
  1864.   drive:\path\filename.REX. 
  1865.  
  1866. Each time DrDialog saves or runs your .RES file, it checks for the existence of 
  1867. a corresponding .REX file. If the file exists, its contents are automatically 
  1868. included in your .RES file as a special resource type. When your application 
  1869. runs, this special resource is added to the end of the REXX program that DrRexx 
  1870. creates for you. 
  1871.  
  1872. Note:  When you distribute your DrRexx application, you need not include your 
  1873. .REX file, since its contents have already been included in your .RES (or .EXE) 
  1874. file. 
  1875.  
  1876. While the bulk of your DrRexx application can be stored in a separate .REX 
  1877. file, you must still use the DrRexx editor to provide pointers to the various 
  1878. event handlers in your .REX code. DrDialog assists you with this linking 
  1879. operation as follows: 
  1880.  
  1881. If the multi-line edit control in the events section of the DrRexx notebook is 
  1882. empty, and you click the button, DrDialog will insert text of the form: CALL 
  1883. dialog.control.event into the multi-line edit control. In addition, it will 
  1884. copy text of the form: dialog.control.event: into the system clipboard. 
  1885.  
  1886. The CALL statement inserted into the edit control provides the necessary link 
  1887. to your .REX code. You can then switch to your editor (e.g. using the Switch 
  1888. button) and paste the label created by DrDialog into your .REX file. Finish the 
  1889. process by adding the REXX code needed to handle the event and you're done! 
  1890.  
  1891. Note:  You do not need to use this feature of DrDialog in order to call your 
  1892. .REX code. You are free to choose whatever names for your routines that you 
  1893. like. If you do, you are responsible for ensuring that there are no duplicate 
  1894. or invalid labels in your application. 
  1895.  
  1896. The following summarizes the important points to remember when storing your 
  1897. REXX code in an external file: 
  1898.  
  1899. o The REXX code must be stored in a file having the same name as your .RES 
  1900.   file, but with a .REX extension. 
  1901.  
  1902. o The .REX code is automatically included whenever DrDialog saves or runs your 
  1903.   .RES file. It only includes the version stored on disk, so make sure you save 
  1904.   the .REX file in your editor before saving or running the .RES file in 
  1905.   DrDialog. 
  1906.  
  1907. o Terminate your .REX file event handler routines with a RETURN or SIGNAL 
  1908.   RETURN statement, depending on whether you CALLed or SIGNALed the event 
  1909.   handler from your DrRexx code. 
  1910.  
  1911. o Your .REX code becomes part of the .RES file when you save the .RES file in 
  1912.   DrDialog, so you need not include it when you distribute your application to 
  1913.   other users. 
  1914.  
  1915.  
  1916. ΓòÉΓòÉΓòÉ 9.4. Writing REXX code for DrRexx ΓòÉΓòÉΓòÉ
  1917.  
  1918. For the most part, writing REXX code for use with DrRexx is no different than 
  1919. writing any other kind of REXX code. The full power of the REXX interpreter and 
  1920. language are available for your use, including the use of external function 
  1921. libraries such as RexxUtil. 
  1922.  
  1923. However, there are a number of details about the DrRexx environment that should 
  1924. be kept in mind when writing an application: 
  1925.  
  1926. o Event handlers are dispatched using the REXX SIGNAL statement. You do not 
  1927.   need to specify a label in your code though. DrRexx will generate the 
  1928.   appropriate label for you. In addition, DrRexx will automatically generate a 
  1929.   SIGNAL statement at the end of your event handler to return control to the 
  1930.   DrRexx event dispatcher. If you want to exit a signal handler other than by 
  1931.   falling out the bottom of your code, you can do so by issuing a SIGNAL 
  1932.   RETURN. RETURN is the label of the DrRexx statement that waits for and 
  1933.   dispatches the next event. 
  1934.  
  1935. o Global procedures that you write can either be CALLed or SIGNALed. DrRexx 
  1936.   automatically generates the name you supplied as the label for the global 
  1937.   procedure, and also generates a RETURN statement after the last statement of 
  1938.   the procedure. 
  1939.  
  1940. o All DrRexx applications are by their nature OS/2 Presentation Manager 
  1941.   programs. Only operations that make sense within the context of a PM program 
  1942.   should be performed in a DrRexx application. For example, you should not use 
  1943.   the RexxUtil function SysTextScreenRead, since this function is defined to 
  1944.   work only in a windowed or full-screen application. 
  1945.  
  1946. o All SAY or trace output is directed to the DrRexx run-time control window 
  1947.   (unless redirected to a different window using the IsDefault window 
  1948.   function). 
  1949.  
  1950.   This window is always available when running a DrRexx application under 
  1951.   control of DrDialog. When running under the stand-alone DrRexx environment, 
  1952.   SAY or trace output causes the DrRexx run-time control window to appear 
  1953.   automatically. 
  1954.  
  1955.   Each line of SAY or trace output appears as a separate line inserted at the 
  1956.   bottom of a scrolling list in the run-time control window. Only the last 100 
  1957.   lines of output are kept. 
  1958.  
  1959. o PARSE SOURCE returns OS/2 SUBROUTINE resFile, where resFile is the name of 
  1960.   the .RES file being run. Note that when running the application under 
  1961.   DrDialog, resFile is the name of the file most recently saved or loaded, even 
  1962.   if it was from a previous session. 
  1963.  
  1964. o PULL and other related REXX instructions that read from the data queue will 
  1965.   cause a pop-up entry field window to appear. Data entered into this window is 
  1966.   returned as the value PULL'ed. 
  1967.  
  1968.  
  1969. ΓòÉΓòÉΓòÉ 9.5. The DrRexx execution model ΓòÉΓòÉΓòÉ
  1970.  
  1971. In writing a DrRexx application, the following concept should always be kept in 
  1972. mind: all REXX code is executed in response to some event (of course, there is 
  1973. one exception to this rule, but we'll get to that later) 
  1974.  
  1975. If you are already familiar with Presentation Manager programming, the 
  1976. preceding statement comes as no surprise. But if you are mostly familiar with 
  1977. writing batch mode REXX programs, this notion might take some getting used to. 
  1978.  
  1979. Basically, a DrRexx application works as follows: 
  1980.  
  1981.  1. The DrRexx run-time monitor waits for an event to occur. 
  1982.  2. Once an event occurs, it determines which piece of REXX code should be 
  1983.     executed to handle it (see the Events section for more information on how 
  1984.     this is done). 
  1985.  3. If no handler is found, the event is ignored, and control returns to step 
  1986.     1. 
  1987.  4. If a handler is found, it is executed, and then control returns to step 1. 
  1988.  
  1989. It really is that simple. Of course, there are a few other questions that need 
  1990. to be asked (and answered): 
  1991.  
  1992. o Q. What happens before the first event occurs (i.e. how does a DrRexx 
  1993.   application get started)? 
  1994.  
  1995. o A. After the DrRexx run-time environment finishes loading your resource file, 
  1996.   it starts the ball rolling by automatically invoking the REXX procedure 
  1997.   called Init. If you have written such a procedure in the global procedures 
  1998.   section of the DrRexx notebook, it will be called at this time. If you have 
  1999.   not written such as procedure, the run-time environment will automatically 
  2000.   supply an empty procedure for you. Note that the Init procedure is the one 
  2001.   exception to the rule for executing REXX code that we mentioned above (i.e. 
  2002.   it is not executed in response to any event). 
  2003.  
  2004.   After running the Init procedure, the run-time environment checks to see if 
  2005.   any dialogs have been created yet (you'll see how to do this in the section 
  2006.   on DrRexx window functions). If one or more dialogs have already been 
  2007.   created, the run-time environment enters the loop we described previously. 
  2008.  
  2009.   If no dialogs are created by the Init procedure, the run-time environment 
  2010.   searches through all the dialogs in the resource file for the one with the 
  2011.   smallest ID number and automatically creates it for you. It then enters the 
  2012.   loop described above to wait for the first event. 
  2013.  
  2014.   If your resource file does not contain any dialogs at all, the run-time 
  2015.   environment pops up the run-time control window and displays the error 
  2016.   message: "No dialog to load". You can then click on the button to terminate 
  2017.   the DrRexx run-time environment (this situation might happen if you were to 
  2018.   drag and drop the DrRexx template icon to create a new DrRexx application, 
  2019.   and then double-clicked the new icon thinking you would invoke the DrDialog 
  2020.   editor, but instead end up invoking the DrRexx run-time environment). 
  2021.  
  2022. o Q. How do I terminate a DrRexx application? 
  2023.  
  2024. o A. You can terminate a DrRexx application in one of two ways: 
  2025.  
  2026.    - Execute the REXX EXIT statement. 
  2027.  
  2028.    - Close all of your dialogs (refer to the DrRexx window functions section 
  2029.      for more information on how to do this). 
  2030.  
  2031.  
  2032. ΓòÉΓòÉΓòÉ 9.6. DrRexx subcommand environments ΓòÉΓòÉΓòÉ
  2033.  
  2034. In addition to the standard REXX CMD subcommand environment (which is the 
  2035. initial environment for all DrRexx applications), DrRexx also defines two 
  2036. additional subcommand environments: 
  2037.  
  2038. SAY       Treats each subcommand string as if a REXX SAY statement had been 
  2039.           performed on it. 
  2040.  
  2041. NULL      Discards each subcommand string without taking any action. 
  2042.  
  2043. For example, if ADDRESS "NULL" appears in the DrRexx Init global procedure, all 
  2044. subsequent subcommands will be discarded for the duration of the DrRexx 
  2045. application (or until another ADDRESS statement is executed). 
  2046.  
  2047. Using the NULL subcommand environment allows DrRexx code to be written in a 
  2048. somewhat simpler style, as the following example illustrates: 
  2049.  
  2050.    /* Load a listbox with data: */
  2051.    list.Delete()
  2052.    DO i = 1 TO file.0
  2053.       list.Add( file.i )
  2054.    END
  2055.  
  2056. If NULL were not the current subcommand environment, the preceding example 
  2057. might have been written as: 
  2058.  
  2059.    /* Load a listbox with data: */
  2060.    CALL list.Delete
  2061.    DO i = 1 TO file.0
  2062.       CALL list.Add file.i
  2063.    END
  2064.  
  2065. Note:  It is a common error to use the coding style of the first example even 
  2066. though NULL is not the current subcommand environment. This can slow your 
  2067. application down significantly since the subcommand strings are normally passed 
  2068. to the CMD subcommand environment, which tries to interpret them as OS/2 
  2069. commands. 
  2070.  
  2071.  
  2072. ΓòÉΓòÉΓòÉ 9.7. Error handling in DrRexx ΓòÉΓòÉΓòÉ
  2073.  
  2074. If a REXX error occurs in the process of executing a DrRexx application, the 
  2075. DrRexx run-time environment handles the error by: 
  2076.  
  2077. o Aborting the currently executing REXX routine 
  2078. o Displaying an error message indicating the cause and source of the error in 
  2079.   the DrRexx run-time control window 
  2080. o Returning to the event loop to wait for the next event 
  2081.  
  2082. A REXX error is thus local to the event handler it occurs in and does not abort 
  2083. execution of the entire DrRexx application. 
  2084.  
  2085. Note:  If the error occurs while running under the stand-alone DrRexx run-time 
  2086. environment, and the run-time control window is not visible at the time of the 
  2087. error, the window will be made visible before displaying the error message. 
  2088.  
  2089. Note:  In order for the DrRexx error handling code just described to work 
  2090. correctly, you should not handle REXX syntax or halt errors directly in your 
  2091. program. 
  2092.  
  2093.  
  2094. ΓòÉΓòÉΓòÉ 9.8. Invoking DrRexx ΓòÉΓòÉΓòÉ
  2095.  
  2096. The syntax for invoking DrRexx is as follows: 
  2097.  
  2098.    DrRexx resourceFile[.RES] [arguments]
  2099.  
  2100. where: 
  2101.  
  2102. resourceFile    Name of the resource file containing the DrRexx application to 
  2103.                 be run. The file extension must be .RES and may be omitted. If 
  2104.                 the file name contains special characters (e.g. blanks), it 
  2105.                 should be enclosed in double quotes (e.g. "My DrRexx 
  2106.                 Application"). 
  2107.  
  2108. arguments       Optional command line arguments to be passed to the DrRexx 
  2109.                 application. 
  2110.  
  2111.  
  2112. ΓòÉΓòÉΓòÉ 9.9. Getting started: Your first DrRexx application ΓòÉΓòÉΓòÉ
  2113.  
  2114. To help overcome any confusion you might have about how to construct a DrRexx 
  2115. application, we'll walk you through the steps for creating a very simple DrRexx 
  2116. application. 
  2117.  
  2118. First, the application... 
  2119.  
  2120. Allow the user to type in and execute OS/2 commands and view their output in an 
  2121. editable window. 
  2122.  
  2123. Now, the DrRexx solution... 
  2124.  
  2125.  1. Open the DrDialog folder and drag the DrRexx.RES icon into whatever folder 
  2126.     you want to store the DrRexx application. If you like, rename the resulting 
  2127.     DrRexx file (e.g. CmdEdit.RES). 
  2128.  2. Drag and drop the new DrRexx file you just created onto the DrDialog icon 
  2129.     in the DrDialog folder. This will invoke the DrDialog editor and bring up 
  2130.     an empty dialog for editing. 
  2131.  3. For this application we will use: 
  2132.  
  2133.    o A single-line edit control for entering commands 
  2134.    o A pushbutton to execute the current command 
  2135.    o A multi-line edit control to hold the output generated by a command. 
  2136.  
  2137.     Click button 2 to display the pop-up menu and then select from the Controls 
  2138.     submenu each of the controls we need (i.e. ,  and ). You will have to 
  2139.     display the pop-up menu three times to do this, once for each control. Then 
  2140.     arrange and size the controls in whatever way you like using button 2 of 
  2141.     the mouse. 
  2142.  
  2143.  4. Next, use the Text option of the pop-up menu to change the text of the 
  2144.     controls to match our intended application (e.g. position the pointer over 
  2145.     the pushbutton, click button 2 to display the pop-up menu, then select the 
  2146.     Text option. When the pop-up dialog appears, type Execute and press Enter). 
  2147.  5. In a similar manner, use the Name option of the pop-up menu to give the 
  2148.     single-line entry field the name command, and the multi-line edit control 
  2149.     the name output. 
  2150.  6. Next, position the pointer over the pushbutton, display the pop-up menu 
  2151.     using button 2, and select the Click option from the Events submenu. 
  2152.  7. The DrRexx notebook should appear with the Click event page of the events 
  2153.     section already selected. Type the following code into the multi-line edit 
  2154.     control on the notebook page: 
  2155.  
  2156.            command.Text() "| RXQUEUE"
  2157.            file = ""
  2158.            DO i = 1 TO queued()
  2159.               PULL line
  2160.               file = file || line || "0D0A"X
  2161.            END
  2162.            CALL output.Text file
  2163.  
  2164.     This is the REXX code we want to execute whenever we click on the 
  2165.     pushbutton. It passes the current contents of the single-line entry field 
  2166.     command to the CMD subcommand environment and queues its output using 
  2167.     RXQUEUE. It then concatenates all lines queued by the command into a single 
  2168.     variable, file, and makes that the new content of the multi-line edit 
  2169.     control: output. 
  2170.  8. Now display the run-time window (e.g. by selecting the icon in the Tools 
  2171.     submenu of the button 2 pop-up menu). When the window appears, click on the 
  2172.     button to run the DrRexx application. 
  2173.  9. All of the DrDialog tool windows (except for the DrRexx notebook) should 
  2174.     disappear and be replaced by your application dialog. Type an OS/2 command 
  2175.     (e.g. DIR) into the single-line edit control, then click on the pushbutton 
  2176.     to execute the command. After a (hopefully brief) delay, the command output 
  2177.     should appear in the multi-line edit control. Voila! 
  2178. 10. Once you have satisfied yourself that the application does indeed work, 
  2179.     either close the dialog window or click on the button in the run-time 
  2180.     window to stop the application. The application dialog should disappear, 
  2181.     and the edit dialog should reappear. 
  2182. 11. Now save the application by selecting the Save option from the File submenu 
  2183.     of the DrDialog menu bar. 
  2184. 12. Exit DrDialog by double-clicking the system menu icon in the top-left hand 
  2185.     corner of the DrDialog background window. 
  2186. 13. If you want, you can verify that you now have a working DrRexx application 
  2187.     by double-clicking on the icon for the DrRexx file in the folder you 
  2188.     originally placed it in. The application dialog should appear and behave 
  2189.     exactly as it did when you ran it under control of the DrDialog editor. 
  2190.  
  2191. That's it... you've created your first DrRexx application! 
  2192.  
  2193. There's plenty of room left for improvement in our little example, so please 
  2194. feel free to go back, experiment, and try out new ideas. The whole point of 
  2195. DrRexx is to make the process of developing PM applications faster, simpler, 
  2196. and maybe even a little bit fun. 
  2197.  
  2198.  
  2199. ΓòÉΓòÉΓòÉ 9.10. DrRexx sample programs ΓòÉΓòÉΓòÉ
  2200.  
  2201. The DrDialog package includes a number of sample DrRexx applications to 
  2202. illustrate programming using DrRexx: 
  2203.  
  2204. File            Description 
  2205. Events.RES      A program that demonstrates the various events that can be 
  2206.                 processed by a DrRexx application 
  2207. Calc.RES        A simple four function calculator 
  2208. Clock.RES       A simple clock 
  2209. Clock2.RES      A somewhat fancier clock 
  2210. Swapper.RES     Displays the size of SWAPPER.DAT 
  2211. BMPList.RES     Displays .BMP and .GIF files 
  2212. Drives.RES      Displays space utilization for a selected drive 
  2213. TestDrop.RES    Displays the information obtained from a 'Drop' event (useful 
  2214.                 for debugging a drag and drop application) 
  2215. DragDrop.RES    Illustrates how drag and drop support works with various 
  2216.                 controls 
  2217.  
  2218. You might wish to try running and editing a few of these applications to get a 
  2219. feel for what DrRexx programming is like. 
  2220.  
  2221. If you have opened the DrDialog subdirectory folder, you can run any of the 
  2222. sample DRREXX applications by double-clicking on its icon. You can also edit 
  2223. any of the sample applications by dragging and dropping its icon on the 
  2224. DrDialog icon. 
  2225.  
  2226.  
  2227. ΓòÉΓòÉΓòÉ 9.11. DrRexx window functions ΓòÉΓòÉΓòÉ
  2228.  
  2229. In addition to the normal suite of REXX built-in functions, the DrRexx run-time 
  2230. environment also defines an extensive set of functions for interacting with 
  2231. Presentation Manager dialogs and controls (i.e. windows). Each of these window 
  2232. functions is invoked using the following object oriented syntax style: 
  2233.  
  2234.    [dialog.][control.]function ( arguments )
  2235.  
  2236. where dialog refers to the name assigned to a dialog using the DrDialog Name 
  2237. window, and control refers to the name assigned to a control using the same 
  2238. tool. For example, the statement: 
  2239.  
  2240.    value = myDialog.entry.Text()
  2241.  
  2242. might be used to retrieve the contents of the entry edit field of the myDialog 
  2243. dialog and assign it to the variable value. 
  2244.  
  2245. Note that the use of dialog and control names are optional. If either or both 
  2246. are omitted, the following rules apply: 
  2247.  
  2248. o If only dialog is omitted, the function applies to the named control within 
  2249.   the dialog in which the event occurred. 
  2250.  
  2251. o If both dialog and control are omitted, the function applies to the control 
  2252.   generating the event. 
  2253.  
  2254. o If only control is omitted, the function applies to the frame of the named 
  2255.   dialog. 
  2256.  
  2257. Note:  In the case of the Init procedure used to start a DrRexx application, 
  2258. there is no event. Therefore, any window function calls it contains must use a 
  2259. fully qualified name. This is the only exception to the above set of rules. 
  2260.  
  2261. If no name was assigned to a dialog using the DrDialog Name window, Dnnn, where 
  2262. nnn is the ID number of the dialog, may be used in place of the dialog name 
  2263. (e.g. D100.entry.Text()). 
  2264.  
  2265. Cnnn, where nnn is the ID number of a control, may also be used in place of the 
  2266. name of a control, whether the control has a name or not (e.g. 
  2267. D100.C101.Text()). 
  2268.  
  2269. In addition, DrRexx also supports the following variation for invoking window 
  2270. functions: 
  2271.  
  2272.    functionFOR( dialog [, control [, arguments]] )
  2273.  
  2274. where dialog and control are as described above. For example: 
  2275.  
  2276.    value = TextFor( "myDialog", "entry" )
  2277.  
  2278. would be the equivalent way of writing the previous example using the alternate 
  2279. syntax style. 
  2280.  
  2281. The main use of this alternate style is in cases where the dialog and control 
  2282. name are determined dynamically at run-time, rather than statically at edit 
  2283. time. 
  2284.  
  2285. The defined window functions are as follows: 
  2286.  
  2287. Name         Description 
  2288. Open         Open (i.e. create) a dialog window 
  2289. Close        Close (i.e. destroy) a dialog window 
  2290. Owner        Get/Set the owner of a dialog window 
  2291. Frame        Get the size of a dialog window's frame 
  2292. Hide         Hide a window 
  2293. Show         Show a window 
  2294. Visible      Get/Set the visibility state of a window 
  2295. Top          Make a window topmost 
  2296. Bottom       Make a window bottommost 
  2297. Enable       Enable a window 
  2298. Disable      Disable a window 
  2299. Enabled      Get/Set the enable state of a window 
  2300. Focus        Give the focus to a window 
  2301. Position     Get/Set a window's position and/or size 
  2302. Text         Get/Set a window's text 
  2303. Add          Add an item to a window 
  2304. Delete       Delete an item from a window 
  2305. Item         Retrieve an item from a window 
  2306. Select       Query/Select an item in a window 
  2307. Range        Set a window's range 
  2308. Style        Get/Set a window's style bits 
  2309. Font         Get/Set a window's font 
  2310. Color        Get/Set a window's color 
  2311. ID           Get a window's ID number 
  2312. Drag         Enable/Disable dragging a control 
  2313. Drop         Enable/Disable a control as a drop target 
  2314. IsDefault    Make a window the current default window 
  2315. Timer        Start/Stop a window timer 
  2316. View         Get/Set a window's viewing mode 
  2317. SetStem      Set a list of window values 
  2318. GetStem      Get a list of window values 
  2319. Controls     Get the names of all controls in a dialog 
  2320. Classes      Get the classes of all controls in a dialog 
  2321.  
  2322.  
  2323. ΓòÉΓòÉΓòÉ 9.11.1. Open ΓòÉΓòÉΓòÉ
  2324.  
  2325. rc = [dialog.]Open(
  2326.       [alias] [, registeredName]
  2327.       [, "Modal" | "Nonmodal" ] )
  2328.  
  2329. Opens (i.e. creates) the dialog for the specified window, which must be a 
  2330. dialog. 
  2331.  
  2332. If no arguments are specified, it creates the dialog corresponding to dialog. 
  2333.  
  2334. Note:  There can be only one dialog with a specified name in existence at a 
  2335. time. 
  2336.  
  2337. If alias is specified, the dialog is created with the name alias. Again, alias 
  2338. must not be the name of an already existing dialog. 
  2339.  
  2340. If registeredName is specified, the dialog is registered with the Presentation 
  2341. Manager so that it will appear on the Window List with the specified name, and 
  2342. the dialog is owned by the desktop. If registeredName is not specified, the 
  2343. dialog is not registered with PM, and in addition the current dialog is made 
  2344. the owner of the newly created dialog. The current dialog is the dialog to 
  2345. which the current event belongs. 
  2346.  
  2347. If the third argument is omitted or Nonmodal, then the dialog is displayed 
  2348. normally. If the third argument is Modal, then the dialog is displayed modally. 
  2349. A modal dialog disables all other dialogs currently open and prevents the user 
  2350. from interacting with them until the modal dialog is closed. When the modal 
  2351. dialog is closed, all previously disabled dialogs are re-enabled. Note that 
  2352. only the first letter (i.e. M or N) of the third argument need by specified. 
  2353.  
  2354. A result of 1 indicates the window was successfully created, and a result of 0 
  2355. indicates that the window could not be created (e.g. a dialog with the same 
  2356. name already exists). 
  2357.  
  2358. For example: 
  2359.  
  2360.    /* Create two calculator windows */
  2361.    /* then hide the second one:     */
  2362.    CALL calc.Open "calc1"
  2363.    CALL calc.Open "calc2"
  2364.    CALL calc2.Hide
  2365.  
  2366.  
  2367. ΓòÉΓòÉΓòÉ 9.11.2. Close ΓòÉΓòÉΓòÉ
  2368.  
  2369. rc = [dialog.]Close()
  2370.  
  2371. Closes (i.e. destroys) the specified window, which must be a dialog. 
  2372.  
  2373. A result of 1 indicates the window was successfully destroyed, and a result of 
  2374. 0 indicates that the window could not be destroyed (e.g. it did not exist to 
  2375. start with). 
  2376.  
  2377. For example: 
  2378.  
  2379.    /* Close a prompt window: */
  2380.    CALL prompt.Close
  2381.  
  2382.  
  2383. ΓòÉΓòÉΓòÉ 9.11.3. Owner ΓòÉΓòÉΓòÉ
  2384.  
  2385. oldOwner = [dialog.]Owner( [newOwner] )
  2386.  
  2387. Gets or sets the owner window for the specified window, which must be a dialog. 
  2388.  
  2389. Returns the current owner of the specified window. If the desktop is the 
  2390. current owner of the window, the null string is returned. 
  2391.  
  2392. NewOwner specifies the name of the window which is to be the new owner of the 
  2393. specified window. If newOwner is the null string, the desktop window is made 
  2394. the new owner of the window; otherwise newOwner must be the name or alias of an 
  2395. existing dialog window. 
  2396.  
  2397. Making one window the owner of another affects the windows in the following 
  2398. manner: 
  2399.  
  2400. o If the owner window is moved, the owned window moves with it. 
  2401. o If the owner window is destroyed, any windows it owns are also destroyed. 
  2402.  
  2403. For example: 
  2404.  
  2405.    /* Make the window 'owned' by the desktop: */
  2406.    CALL prompt.Owner ""
  2407.  
  2408.  
  2409. ΓòÉΓòÉΓòÉ 9.11.4. Frame ΓòÉΓòÉΓòÉ
  2410.  
  2411. result = [dialog.]Frame()
  2412.  
  2413. Gets the size of the frame for the specified window, which must be a dialog. 
  2414. The result is a string of the form: left bottom right top, where: 
  2415.  
  2416. left      Width of left side of dialog frame 
  2417. bottom    Height of bottom side of dialog frame 
  2418. right     Width of right side of dialog frame 
  2419. top       Height of top side of dialog frame 
  2420.  
  2421. For example: 
  2422.  
  2423.    /* Make the dialog big enough to hold */
  2424.    /* 2 40 x 40 icon buttons:            */
  2425.    PARSE VALUE dialog.Position() WITH x y . .
  2426.    PARSE VALUE dialog.Frame() WITH left bottom right top
  2427.    CALL button1.Position left, bottom
  2428.    CALL button2.Position left + 40, bottom
  2429.    CALL dialog.Position x, y, left + 80 + right,,
  2430.                         bottom + 40 + top
  2431.  
  2432.  
  2433. ΓòÉΓòÉΓòÉ 9.11.5. Hide ΓòÉΓòÉΓòÉ
  2434.  
  2435. [dialog.][control.]Hide(
  2436.       [ "Update" | "Noupdate" ] )
  2437.  
  2438. Hides the specified window, which can be any dialog or control. 
  2439.  
  2440. If no argument or Update is specified, the window is hidden immediately. If 
  2441. Noupdate is specified, the window is not hidden, but all future updates to the 
  2442. window are inhibited until the window is made visible again using the Show 
  2443. function. Only the first letter (i.e. U or N) need be specified. 
  2444.  
  2445. For example: 
  2446.  
  2447.    /* Hide a list while it is being updated: */
  2448.    CALL list.Hide "N"
  2449.    CALL list.Delete
  2450.    DO i = 1 TO data.0
  2451.       CALL list.Add data.i
  2452.    END
  2453.    CALL list.Show
  2454.  
  2455.  
  2456. ΓòÉΓòÉΓòÉ 9.11.6. Show ΓòÉΓòÉΓòÉ
  2457.  
  2458. [dialog.][control.]Show()
  2459.  
  2460. Shows the specified window, which can be any dialog or control. 
  2461.  
  2462. This function makes visible a window that was initially hidden or made hidden 
  2463. using the Hide function. 
  2464.  
  2465. For example: 
  2466.  
  2467.    /* Show a pushbutton: */
  2468.    CALL button.Show
  2469.  
  2470.  
  2471. ΓòÉΓòÉΓòÉ 9.11.7. Visible ΓòÉΓòÉΓòÉ
  2472.  
  2473. oldState = [dialog.][control.]Visible(
  2474.       [newState] )
  2475.  
  2476. Gets or sets the visibility state of the specified window, which can be any 
  2477. dialog or control. 
  2478.  
  2479. Returns 1 if the window is currently visible and 0 if it is hidden. 
  2480.  
  2481. If newState is specified, it makes the specified window visible if newState is 
  2482. not 0, and hides the window is newState is 0. 
  2483.  
  2484. For example: 
  2485.  
  2486.    /* Hide the 'OK' pushbutton if the entry field is hidden: */
  2487.    IF entry.Visible() = 0 THEN CALL okButton.Visible 0
  2488.  
  2489.  
  2490. ΓòÉΓòÉΓòÉ 9.11.8. Top ΓòÉΓòÉΓòÉ
  2491.  
  2492. [dialog.][control.]Top()
  2493.  
  2494. Makes the specified window, which can be any dialog or control, the topmost in 
  2495. its group. If the window is a control, the control is moved in front of all 
  2496. other controls in the same dialog. If the window is a dialog, the dialog is 
  2497. moved in front of all other dialogs on the screen. 
  2498.  
  2499. For example: 
  2500.  
  2501.    /* Move the playing card to the top of the deck: */
  2502.    CALL TopFor 'Tableau', curCard
  2503.  
  2504.  
  2505. ΓòÉΓòÉΓòÉ 9.11.9. Bottom ΓòÉΓòÉΓòÉ
  2506.  
  2507. [dialog.][control.]Bottom()
  2508.  
  2509. Makes the specified window, which can be any dialog or control, the bottommost 
  2510. in its group. If the window is a control, the control is moved behind all other 
  2511. controls in the same dialog. If the window is a dialog, the dialog is moved 
  2512. behind all other dialogs on the screen. 
  2513.  
  2514. For example: 
  2515.  
  2516.    /* Move the playing card to the bottom of the deck: */
  2517.    CALL BottomFor 'Tableau', curCard
  2518.  
  2519.  
  2520. ΓòÉΓòÉΓòÉ 9.11.10. Enable ΓòÉΓòÉΓòÉ
  2521.  
  2522. [dialog.][control.]Enable()
  2523.  
  2524. Enables the specified window, which can be any dialog or control. 
  2525.  
  2526. Enabling a window allows a user to interact with it. This function can be used 
  2527. to re-enable a window that was previously disabled using the Disable function. 
  2528.  
  2529. For example: 
  2530.  
  2531.    /* Enable a pushbutton: */
  2532.    CALL button.Enable
  2533.  
  2534.  
  2535. ΓòÉΓòÉΓòÉ 9.11.11. Disable ΓòÉΓòÉΓòÉ
  2536.  
  2537. [dialog.][control.]Disable()
  2538.  
  2539. Disables the specified window, which can be any dialog or control. 
  2540.  
  2541. Disabling a window prevents a user from interacting with it. The window can 
  2542. later be re-enabled using the Enable function. 
  2543.  
  2544. For example: 
  2545.  
  2546.    /* Disable a pushbutton: */
  2547.    CALL button.Disable
  2548.  
  2549.  
  2550. ΓòÉΓòÉΓòÉ 9.11.12. Enabled ΓòÉΓòÉΓòÉ
  2551.  
  2552. oldState = [dialog.][control.]Enabled(
  2553.       [newState] )
  2554.  
  2555. Gets or sets the enabled state of the specified window, which can be any dialog 
  2556. or control. 
  2557.  
  2558. Returns 1 if the window is currently enabled, and 0 if it is disabled. 
  2559.  
  2560. If newState is specified, it enables the specified window if newState is not 0, 
  2561. and disables the window is newState is 0. 
  2562.  
  2563. For example: 
  2564.  
  2565.    /* Disable the entry field if the check box is not selected: */
  2566.    IF check.Select() = 0 THEN CALL entry.Enabled 0
  2567.  
  2568.  
  2569. ΓòÉΓòÉΓòÉ 9.11.13. Focus ΓòÉΓòÉΓòÉ
  2570.  
  2571. [dialog.][control.]Focus()
  2572.  
  2573. Gives the input focus to the specified window, which can be any dialog or 
  2574. control. 
  2575.  
  2576. For example: 
  2577.  
  2578.    /* Give the focus to an entry field: */
  2579.    CALL entry.Focus
  2580.  
  2581.    /* Give the focus to a different dialog: */
  2582.    CALL promptDialog.Focus
  2583.  
  2584.  
  2585. ΓòÉΓòÉΓòÉ 9.11.14. Position ΓòÉΓòÉΓòÉ
  2586.  
  2587. result = [dialog.][control.]Position(
  2588.       [x [y [dx [dy] ] ] ] )
  2589.       [x [, y [, dx [, dy] ] ] ] )
  2590.  
  2591. Gets or sets the position of the specified window, which can be any dialog or 
  2592. control. 
  2593.  
  2594. If no arguments are specified, it returns the current size and position of the 
  2595. window as a string of the form: x y dx dy. 
  2596.  
  2597. The size and position of the window can be set by specifying one or more 
  2598. arguments as shown above. omitted trailing arguments leave their current value 
  2599. unchanged. 
  2600.  
  2601. For example: 
  2602.  
  2603.    /* Move a pushbutton to a new location: */
  2604.    CALL button.Position 20, 30
  2605.  
  2606.  
  2607. ΓòÉΓòÉΓòÉ 9.11.15. Text ΓòÉΓòÉΓòÉ
  2608.  
  2609. oldText = [dialog.][control.]Text(
  2610.       [newText] )
  2611.  
  2612. Returns the current text associated with the specified window, which can be any 
  2613. dialog or control, and optionally sets a new text value. 
  2614.  
  2615. The text associated with a window varies from window to window. For a 
  2616. pushbutton, it is its label. For a dialog, it is its window bar title. For a 
  2617. multi-line edit control, it is the complete text contained within the control. 
  2618. Other controls may have not any text associated with them (e.g. a Rectangle 
  2619. control). In that case, the result returned is the null string, and any value 
  2620. set is ignored. 
  2621.  
  2622. Note:  If the specified window is a dialog, setting a new value for the title 
  2623. bar using Text will also set the dialog's Window List entry if the dialog was 
  2624. originally registered with Presentation Manager in the Open function used to 
  2625. create the dialog. 
  2626.  
  2627. For example: 
  2628.  
  2629.    /* Clear the contents of an edit field: */
  2630.    CALL myDialog.edit.Text ""
  2631.  
  2632.  
  2633. ΓòÉΓòÉΓòÉ 9.11.16. Add ΓòÉΓòÉΓòÉ
  2634.  
  2635. Adds an item to the specified window, which must be a list box, combo box, 
  2636. notebook or container. 
  2637.  
  2638.  
  2639. ΓòÉΓòÉΓòÉ 9.11.17. Add (for a list box or combo box) ΓòÉΓòÉΓòÉ
  2640.  
  2641. result = [dialog.][control.]Add(
  2642.       item
  2643.       [, "Ascending" | "Descending" | "Last" | n]
  2644.       [, data] )
  2645.  
  2646. Adds an item to the specified list box or combo box. The text of the item to be 
  2647. added is specified by item. The second argument specifies where the item is to 
  2648. be added into the list: 
  2649.  
  2650. o In Ascending order 
  2651. o In Descending order 
  2652. o Last 
  2653. o As item n 
  2654.  
  2655. Only the first letter (i.e. A, D, or L) need be specified. If the second 
  2656. argument is omitted, the item will be added at the end of the list (i.e. last). 
  2657.  
  2658. The third argument specifies an optional data value to be associated with the 
  2659. item. Data will not appear in the list, but can later be retrieved using the 
  2660. Item function. 
  2661.  
  2662. The index of the inserted item in the list is returned as the result. 
  2663.  
  2664. For example: 
  2665.  
  2666.    /* Put all words in a string into a */
  2667.    /* list in alphabetical order:      */
  2668.    DO i = 1 TO words( string )
  2669.       CALL myDialog.list.Add word( string, i ), "A"
  2670.    END
  2671.  
  2672.  
  2673. ΓòÉΓòÉΓòÉ 9.11.18. Add (for a notebook) ΓòÉΓòÉΓòÉ
  2674.  
  2675. result = [dialog.][control.]Add(
  2676.       [page]
  2677.       [, "First" | "Last" | "Next" | "Previous"]
  2678.       [, dialog] [, tab] [, status] [, data] )
  2679.  
  2680. Inserts a new page into a notebook. Page specifies the page to insert relative 
  2681. to, and should either be 0 or a page ID returned by a previous Add call for the 
  2682. same notebook. The second argument specifies where the new page is to be 
  2683. inserted into the notebook: 
  2684.  
  2685. o As the First page (page may be 0) 
  2686. o As the Last page (page may be 0) 
  2687. o As the Next page after page 
  2688. o As the Previous page before page 
  2689.  
  2690. Only the first letter (i.e. F, L, N or P) need be specified. Note also that the 
  2691. case of the first character of the second argument is important. If upper case, 
  2692. a page with a major tab is inserted. If lower case, a page with a minor tab is 
  2693. inserted. If the second argument is omitted, the new page will be added with a 
  2694. major tab as the last page of the notebook. 
  2695.  
  2696. Dialog specifies the name of the dialog to be used as the contents of the new 
  2697. page. If omitted, a blank page is inserted. The dialog name may either be the 
  2698. name of a dialog in the resource file or the alias of a dialog created using 
  2699. the Open function. If a dialog resource name is specified, it need not have 
  2700. already been opened. 
  2701.  
  2702. Note:  It is good practice to define all dialogs used as notebook pages with 
  2703. the Visible attribute off. This prevents the dialog from momentarily appearing 
  2704. outside of the notebook when it is added. The notebook control will 
  2705. automatically make the dialog visible whenever its page is selected. Also note 
  2706. that a single dialog can be used as the contents for more than one page of the 
  2707. same notebook. 
  2708.  
  2709. Tab. status, and data specify the initial contents of the new page's tab, 
  2710. status line, and data fields respectively. See the Item function for more 
  2711. information about getting and setting the value of these fields. Note that if 
  2712. status is specified and is not empty, the new page will have a status line; 
  2713. otherwise it will not. 
  2714.  
  2715. The ID of the newly created page is returned as the result. If the result is 0, 
  2716. the page was not created successfully. 
  2717.  
  2718. For example: 
  2719.  
  2720.    /* Insert a major and minor page at the */
  2721.    /* beginning of a notebook:             */
  2722.    page1 = notebook.Add( 0, "F", "CoverPage", "=BITMAP:#50" )
  2723.    page2 = notebook.Add( page1, "n", "DataPage",
  2724.               "Data", "Customer data" )
  2725.  
  2726.  
  2727. ΓòÉΓòÉΓòÉ 9.11.19. Add (for a container) ΓòÉΓòÉΓòÉ
  2728.  
  2729. result = [dialog.][control.]Add(
  2730.       label [, bitmap]
  2731.       [, "First" | "Last" | "Next"] [, item]
  2732.       [, data] )
  2733.  
  2734. Inserts a new item into a container. Label specifies the text label to use for 
  2735. the new item. Bitmap specifies the name of the optional bitmap to display with 
  2736. the new item. If specified, it should be a string of the form: dll:#resource, 
  2737. where resource is the resource number of the bitmap within the DLL specified by 
  2738. dll (e.g. BITMAP:#50). Alternatively, the form: filename.BMP can also be used, 
  2739. where filename.BMP is the name of a file containing a bitmap in .BMP format. If 
  2740. bitmap is not specified, then no bitmap is displayed for the new item. 
  2741.  
  2742. The third argument specifies where the new item should be inserted in the 
  2743. container: 
  2744.  
  2745. o As the First item 
  2746. o As the Last item (the default) 
  2747. o As the Next item after item 
  2748.  
  2749. If Next is specified, the new item is always inserted after the entry specified 
  2750. by item. If the second argument is First or Last, the new item is inserted at 
  2751. the beginning or end of the container, unless item is specified, in which case 
  2752. the new item is inserted as the first or last item whose parent is item. If 
  2753. specified, item must be a value returned by a previous Add request for the same 
  2754. container. Specifying item allows the items in the container to be organized 
  2755. and displayed hierarchically using the Hierarchy or Outline argument to the 
  2756. View function. 
  2757.  
  2758. Only the first letter (i.e. F, L or N) of the third argument need be specified. 
  2759. The case of the first letter also determines the placement of the new item in 
  2760. the container's z-order. An upper case letter (e.g. L) will place the item at 
  2761. the top of the z-order (i.e. on top of all other container items); while a 
  2762. lower case letter (e.g. l) will place the new item at the bottom of the z-order 
  2763. (i.e. beneath all other container items). 
  2764.  
  2765. Data specifies an optional data value to associate with the new item. Its value 
  2766. can later be retrieved or modified using the Item function. 
  2767.  
  2768. The ID of the newly created item is returned as the result. 
  2769.  
  2770. For example: 
  2771.  
  2772.    /* Insert a folder container two files into */
  2773.    /* a container:
  2774.    folder = container.Add( "Sample", "BITMAP:#68" )
  2775.    CALL container.Add "TEST.RES", "BITMAP:#1",, folder
  2776.    CALL container.Add "TEST.REX", "BITMAP:#1",, folder
  2777.  
  2778.  
  2779. ΓòÉΓòÉΓòÉ 9.11.20. Delete ΓòÉΓòÉΓòÉ
  2780.  
  2781. Deletes one or all items from the specified window, which must either be a list 
  2782. box, combo box, notebook or a container. 
  2783.  
  2784.  
  2785. ΓòÉΓòÉΓòÉ 9.11.21. Delete (for a list box or combo box) ΓòÉΓòÉΓòÉ
  2786.  
  2787. rc = [dialog.][control.]Delete(
  2788.       [index] )
  2789.  
  2790. Deletes one or all items from the specified list box or combo box. If no 
  2791. arguments are specified, all list items are deleted. If index is specified, the 
  2792. indexth item in the list is deleted (the index of the first list item is 1). 
  2793.  
  2794. The function returns the number of items remaining in the list box or combo box 
  2795. after the delete. 
  2796.  
  2797. For example: 
  2798.  
  2799.    /* Delete all list items: */
  2800.    CALL myDialog.list.Delete
  2801.  
  2802.  
  2803. ΓòÉΓòÉΓòÉ 9.11.22. Delete (for a notebook) ΓòÉΓòÉΓòÉ
  2804.  
  2805. rc = [dialog.][control.]Delete(
  2806.       [page] )
  2807.  
  2808. Deletes one or all pages from the specified notebook. If no arguments are 
  2809. specified, all notebook pages are deleted. If page is specified, the 
  2810. corresponding notebook page is deleted. Page should be a page ID returned by a 
  2811. previous Add call for the same notebook. 
  2812.  
  2813. The function returns 1 if the delete was successful and 0 otherwise. 
  2814.  
  2815. For example: 
  2816.  
  2817.    /* Delete a particular notebook page: */
  2818.    CALL notebook.Delete page1
  2819.  
  2820.  
  2821. ΓòÉΓòÉΓòÉ 9.11.23. Delete (for a container) ΓòÉΓòÉΓòÉ
  2822.  
  2823. rc = [dialog.][control.]Delete(
  2824.       [item] )
  2825.  
  2826. Deletes one or all items from the specified container. If no arguments are 
  2827. specified, all items are deleted; otherwise only the item specified by item is 
  2828. deleted. 
  2829.  
  2830. The function returns the number of items successfully deleted from the 
  2831. container. 
  2832.  
  2833. For example: 
  2834.  
  2835.    /* Delete all container items: */
  2836.    CALL container.Delete
  2837.  
  2838.  
  2839. ΓòÉΓòÉΓòÉ 9.11.24. Item ΓòÉΓòÉΓòÉ
  2840.  
  2841. Gets or sets an item from the specified window, which must be a list box, combo 
  2842. box, notebook, value set, slider or container. 
  2843.  
  2844.  
  2845. ΓòÉΓòÉΓòÉ 9.11.25. Item (for a list box or combo box) ΓòÉΓòÉΓòÉ
  2846.  
  2847. result = [dialog.][control.]Item(
  2848.       [index [, "Value" | "Data" ] [, value] ] )
  2849.  
  2850. Gets or sets an item from the specified list box or combo box. 
  2851.  
  2852. If no arguments are specified, it returns the number of items currently in the 
  2853. list. 
  2854.  
  2855. If index is specified, it returns information about the indexth item in the 
  2856. list (the index of the first list item is 1). If the second argument is Value 
  2857. or omitted, the list item itself is returned. If the second argument is Data, 
  2858. the data originally associated with the item using the Add function is 
  2859. returned. Only the first letter of the second argument (i.e. V or D) need be 
  2860. specified. 
  2861.  
  2862. If value is specified, it replaces the current value (or data) of the indexth 
  2863. item. 
  2864.  
  2865. For example: 
  2866.  
  2867.    /* Move a list item from one list to another: */
  2868.    CALL list2.Add list1.Item( index )
  2869.    CALL list1.Delete index
  2870.  
  2871.  
  2872. ΓòÉΓòÉΓòÉ 9.11.26. Item (for a notebook) ΓòÉΓòÉΓòÉ
  2873.  
  2874. result = [dialog.][control.]Item(
  2875.       [page [, "Tab" | "Status" | "Data"] [, value] ] )
  2876.  
  2877. Gets or sets a page item from the specified notebook. 
  2878.  
  2879. If no arguments are specified, it returns the number of pages in the notebook. 
  2880.  
  2881. If page is specified, it gets or sets information about the specified notebook 
  2882. page, which should be an ID returned by a previous Add call for the same 
  2883. notebook. The second argument specifies what kind of information about the page 
  2884. is to be set or retrieved: 
  2885.  
  2886. o The page Tab 
  2887. o The page Status line 
  2888. o The page user defined Data 
  2889.  
  2890. Only the first letter (i.e. T, S, or D) need be specified. If the second 
  2891. argument is omitted, it defaults to getting or setting the notebook page tab. 
  2892.  
  2893. Value specifies the data used to set new page information. If value is omitted, 
  2894. the current value is not changed. 
  2895.  
  2896. The function returns the current value for the specified page prior to setting 
  2897. any new value. 
  2898.  
  2899. Note:  A bitmap can be used as a page tab by specifying value as: 
  2900. =dll:#resource, where resource is the resource number of the bitmap within the 
  2901. DLL specified by dll (e.g. =BITMAP:#50). Alternatively, the form: =filename.BMP 
  2902. can also be used, where filename.BMP is the name of a file containing a bitmap 
  2903. in .BMP format. 
  2904.  
  2905. For example: 
  2906.  
  2907.    /* Set a notebook page's tab and status line: */
  2908.    CALL notebook.item page1, "T", "=BITMAP:#50"
  2909.    CALL notebook.item page1, "S", "Order:" orderNum
  2910.  
  2911.  
  2912. ΓòÉΓòÉΓòÉ 9.11.27. Item (for a value set) ΓòÉΓòÉΓòÉ
  2913.  
  2914. result = [dialog.][control.]Item(
  2915.       [row, column [, value] ] )
  2916.  
  2917. Gets or sets an item from the specified value set. 
  2918.  
  2919. If no arguments are specified, it returns the number of rows and columns in the 
  2920. value set in the form: rows columns. 
  2921.  
  2922. If row and column are specified, it returns the current value of the item at 
  2923. the specified row and column. 
  2924.  
  2925. Value specifies the new value for the item at the specified row and column. If 
  2926. omitted, the current value is not changed. Value may be any of the following 
  2927. forms: 
  2928.  
  2929. [@]text 
  2930.           A text label (e.g. "Next"). Note that the leading '@' character is 
  2931.           optional, and can be used to distinguish a label starting with '=' or 
  2932.           '#'. 
  2933.  
  2934. =dll:#resource 
  2935.           A bitmap with resource number resource in the .DLL specified by dll. 
  2936.  
  2937. =filename.BMP 
  2938.           A bitmap stored in the .BMP file specified by filename.BMP. The .BMP 
  2939.           file extension must be specified. 
  2940.  
  2941. #color 
  2942.           A color index (e.g. "#1" equals the color blue). 
  2943.  
  2944. #r g b 
  2945.           A triplet of numbers specifying a color as its component red, green 
  2946.           and blue values (e.g. "#255 255 0" is a bright yellow). 
  2947.  
  2948. For example: 
  2949.  
  2950.    /* Set up a color select value set table: */
  2951.    DO i = 1 TO 16
  2952.       CALL valueset.item 1, i, "#"||(i-1)
  2953.    END
  2954.  
  2955.  
  2956. ΓòÉΓòÉΓòÉ 9.11.28. Item (for a slider) ΓòÉΓòÉΓòÉ
  2957.  
  2958. result = [dialog.][control.]Item(
  2959.       [tick [, "Value" | "Size" ] [, value]] )
  2960.  
  2961. Gets or sets a tick value for the specified slider. 
  2962.  
  2963. If no arguments are specified, it returns the number of tick marks in scale 1 
  2964. and scale 2 of the slider in the form: ticks1 ticks2. 
  2965.  
  2966. If tick is specified, it returns information about the tick mark specified by 
  2967. tick. If tick is greater than 0, then scale 1 of the slider is used and scale 1 
  2968. becomes the current primary scale for the slider. If tick is less than 0, then 
  2969. scale 2 of the slider is used and scale 2 becomes the current primary scale for 
  2970. the slider. In this case, abs( tick ) is used to determine the number of the 
  2971. tick to get or set information about. 
  2972.  
  2973. If the second argument is Value or omitted, then the text associated with the 
  2974. specified tick mark is set or returned. If the second argument is Size, then 
  2975. the width (or height) of the specified tick mark is set or returned. Note that 
  2976. only the first character of the second argument (i.e. V or S) need be 
  2977. specified. 
  2978.  
  2979. The third argument, value, specifies the new value for the specified tick 
  2980. mark's text or size. If omitted, the current value is not changed. 
  2981.  
  2982. For example: 
  2983.  
  2984.    /* Label a slider with Fahrenheit and Centigrade */
  2985.    /* scales with tick marks every two degrees, and */
  2986.    /* text labels every 10 degrees: */
  2987.    DO i = 32 TO 212 BY 2
  2988.       CALL slider.Item i - 31, "S", 5
  2989.    END
  2990.    DO i = 40 TO 210 BY 10
  2991.       CALL slider.Item i - 31,, i
  2992.    END
  2993.    DO i = 0 TO 100 BY 2
  2994.       CALL slider.Item -(i + 1), "S", 5
  2995.    END
  2996.    DO i = 0 TO 100 BY 10
  2997.       CALL slider.Item -(i + 1),, i
  2998.    END
  2999.  
  3000.  
  3001. ΓòÉΓòÉΓòÉ 9.11.29. Item (for a container) ΓòÉΓòÉΓòÉ
  3002.  
  3003. result = [dialog.][control.]Item(
  3004.       [item [, "Value" | "Bitmap" | "Data" | column ]
  3005.       [, value] ] )
  3006.  
  3007. Gets or sets an item value from the specified container. 
  3008.  
  3009. If no arguments are specified, it returns the number of items currently in the 
  3010. container. 
  3011.  
  3012. If item is specified, it gets or sets information about the specified container 
  3013. item, which can either be 0 or an ID returned by a previous Add call for the 
  3014. same container. An item of 0 refers to the container title. 
  3015.  
  3016. The second argument specifies what kind of information about the container item 
  3017. is to be set or retrieved: 
  3018.  
  3019. o The item Value (i.e. label) 
  3020. o The item Bitmap 
  3021. o The item Data 
  3022. o A specified item column: 1..n, where n is the number of columns of data 
  3023.   previously defined for each container item using the SetStem function. 
  3024.  
  3025. For the first three cases, only the first letter (i.e. V, B, or D) need be 
  3026. specified. If the second argument is omitted, it defaults to getting or setting 
  3027. the item's value (i.e. label). 
  3028.  
  3029. Value specifies the data used to set new item information. If value is omitted, 
  3030. the current value is not changed. 
  3031.  
  3032. The function returns the current value for the specified item field prior to 
  3033. setting any new value. 
  3034.  
  3035. For example: 
  3036.  
  3037.    /* If the data field for a container item = "FILE", */
  3038.    /* change its icon to be a 'sticky pad': */
  3039.    IF container.Item( item, "D" ) = "FILE" THEN DO
  3040.       CALL container.Item item, "I", "BITMAP:#60"
  3041.    END
  3042.  
  3043.  
  3044. ΓòÉΓòÉΓòÉ 9.11.30. Select ΓòÉΓòÉΓòÉ
  3045.  
  3046. Gets or selects an item in the specified window, which must be a list box, 
  3047. combo box, single-line edit control, horizontal or vertical scroll bar, 
  3048. spinbutton, push button, radio button, check box, bagbutton, notebook, value 
  3049. set, slider or container. 
  3050.  
  3051.  
  3052. ΓòÉΓòÉΓòÉ 9.11.31. Select (for a list box or combo box) ΓòÉΓòÉΓòÉ
  3053.  
  3054. result = [dialog.][control.]Select(
  3055.       [index [, "Select" | "Unselect" | "Next" | "Top" ] ] )
  3056.  
  3057. Gets or selects an item in the specified list box or combo box. 
  3058.  
  3059. If no arguments are specified, the index of the first selected item in the 
  3060. window is returned. If no item is selected, 0 is returned. 
  3061.  
  3062. If index is specified and the second argument is Select or omitted, the indexth 
  3063. item in the list is selected. The index of the first previously selected item, 
  3064. if any, is returned as the result. 
  3065.  
  3066. If the second argument is Unselect, the indexth item in the list is unselected. 
  3067. The index of the first previously selected item, if any, is returned as the 
  3068. result. 
  3069.  
  3070. If the second argument is Next, the index of the next selected item in the list 
  3071. following the indexth item is returned, if any. If there is no selected item 
  3072. following the specified index, 0 is returned. 
  3073.  
  3074. If the second argument is Top, the list is scrolled so that the indexth item in 
  3075. the list is the topmost. The index of the previous topmost item is returned as 
  3076. the result. 
  3077.  
  3078. Only the first letter of the second argument (i.e. S, U, N, or T) need be 
  3079. specified. 
  3080.  
  3081. For example: 
  3082.  
  3083.    /* Copy the selected item to an edit field: */
  3084.    CALL entry.Text list.Item( list.Select() )
  3085.  
  3086.  
  3087. ΓòÉΓòÉΓòÉ 9.11.32. Select (for a single line edit control) ΓòÉΓòÉΓòÉ
  3088.  
  3089. result = [dialog.][control.]Select(
  3090.       [left [, length] ] )
  3091.       [left length] )
  3092.  
  3093. Gets or selects the range of selected text for the specified single line edit 
  3094. control. 
  3095.  
  3096. It returns the current selection range in the form: start length, where start 
  3097. is the one-based index of the first character selected, and length is the 
  3098. number of characters selected (0 indicates no character is selected). 
  3099.  
  3100. The Start argument specifies the first character to be selected. The length 
  3101. argument specifies the number of characters to include in the selection. Length 
  3102. defaults to 0, which means that no characters are selected (i.e. the cursor is 
  3103. simply moved to the location specified by start). 
  3104.  
  3105. For example: 
  3106.  
  3107.    /* Select the entire edit control's contents: */
  3108.    CALL entry.Select 0, 9999
  3109.  
  3110.  
  3111. ΓòÉΓòÉΓòÉ 9.11.33. Select (for a horizontal or vertical scroll bar) ΓòÉΓòÉΓòÉ
  3112.  
  3113. result = [dialog.][control.]Select(
  3114.       [position] )
  3115.  
  3116. Gets or selects the position of the horizontal or vertical scroll bar's slider. 
  3117.  
  3118. It returns the current position of the scroll bar slider. 
  3119.  
  3120. Position specifies the new position of the slider. 
  3121.  
  3122. For example: 
  3123.  
  3124.    /* Scroll to the beginning of the file: */
  3125.    CALL scroll.Select 1
  3126.  
  3127.  
  3128. ΓòÉΓòÉΓòÉ 9.11.34. Select (for a spinbutton) ΓòÉΓòÉΓòÉ
  3129.  
  3130. result = [dialog.][control.]Select(
  3131.       [position] )
  3132.  
  3133. Gets or selects a spinbutton item. 
  3134.  
  3135. It returns the current value or index selected by the spinbutton. 
  3136.  
  3137. Position specifies the new value or index to be selected by the spinbutton. If 
  3138. the spinbutton is numeric, it specifies the new number selected. If text, 
  3139. position specifies the new index of the value to be selected. 
  3140.  
  3141. For example: 
  3142.  
  3143.    /* Copy the current spinbutton item to the edit field: */
  3144.    item = spin.Select()
  3145.    CALL entry.Text value.item
  3146.  
  3147.  
  3148. ΓòÉΓòÉΓòÉ 9.11.35. Select (for a push button, check box, radio button or bagbutton) ΓòÉΓòÉΓòÉ
  3149.  
  3150. result = [dialog.][control.]Select(
  3151.       [state] )
  3152.  
  3153. Gets or sets the state of the specified push button, check box, radio button or 
  3154. bagbutton. 
  3155.  
  3156. It returns the current state of the button or check box. A 0 means it is in the 
  3157. unchecked state; a 1 means it is in the checked state; and a 2 means it is in 
  3158. the indeterminate state. 
  3159.  
  3160. State specifies the new state of the button or check box, and should have the 
  3161. value 0, 1, or 2 as described above. 
  3162.  
  3163. For example: 
  3164.  
  3165.    /* Set a check box to the 'checked' state: */
  3166.    CALL check.Select 1
  3167.  
  3168.  
  3169. ΓòÉΓòÉΓòÉ 9.11.36. Select (for a notebook) ΓòÉΓòÉΓòÉ
  3170.  
  3171. result = [dialog.][control.]Select(
  3172.       [page] )
  3173.  
  3174. Gets or selects a page in the specified notebook. 
  3175.  
  3176. It returns the ID of the currently selected page of the notebook. 
  3177.  
  3178. Page specifies the ID of the new notebook page to be selected (i.e. brought to 
  3179. the front of the notebook). 
  3180.  
  3181. For example: 
  3182.  
  3183.    /* Set the status line of the selected notebook page: */
  3184.    CALL notebook.Item notebook.Select(), "S", num "files found"
  3185.  
  3186.  
  3187. ΓòÉΓòÉΓòÉ 9.11.37. Select (for a value set) ΓòÉΓòÉΓòÉ
  3188.  
  3189. result = [dialog.][control.]Select(
  3190.       [row, column] )
  3191.  
  3192. Gets or selects an item in the specified value set. 
  3193.  
  3194. It returns the currently selected item of the value set in the form: row 
  3195. column. 
  3196.  
  3197. Row and column specify the position of the new value set item to be selected. 
  3198. The rows and columns of the value set are numbered starting from 1. 
  3199.  
  3200. For example: 
  3201.  
  3202.    /* Select the top-left value set item: */
  3203.    CALL valueset.Select 1, 1
  3204.  
  3205.  
  3206. ΓòÉΓòÉΓòÉ 9.11.38. Select (for a slider) ΓòÉΓòÉΓòÉ
  3207.  
  3208. result = [dialog.][control.]Select(
  3209.       [tick] )
  3210.  
  3211. Gets or selects a tick mark in the specified slider. 
  3212.  
  3213. It returns the number of the currently selected tick on the current primary 
  3214. scale of the slider. 
  3215.  
  3216. Tick specifies the new position of the slider arm in terms of tick marks (the 
  3217. first tick mark is 1). If tick is greater than 0, then scale 1 of the slider is 
  3218. used and scale 1 becomes the current primary scale for the slider. If tick is 
  3219. less than 0, then scale 2 of the slider is used and scale 2 becomes the current 
  3220. primary scale for the slider. In this case, abs( tick ) is used to determine 
  3221. the number of the tick mark to position the slider arm at. 
  3222.  
  3223. For example: 
  3224.  
  3225.    /* Get the current temperature setting of the slider: */
  3226.    temp = slider.Select() + 31
  3227.  
  3228.  
  3229. ΓòÉΓòÉΓòÉ 9.11.39. Select (for a container) ΓòÉΓòÉΓòÉ
  3230.  
  3231. result = [dialog.][control.]Select(
  3232.       [item
  3233.       [, "[+/-]Select" | "[+/-]Mark" |
  3234.          "Cursor" | "Next" ] ] )
  3235.  
  3236. Gets or selects an item in the specified container. 
  3237.  
  3238. If no arguments are specified, the first selected item in the container is 
  3239. returned. If no item is selected, 0 is returned. 
  3240.  
  3241. If item is specified, then if the second argument is: 
  3242.  
  3243. Omitted     The item specified by item is selected. The current first selected 
  3244.             item is returned as the result. 
  3245. [+]Select   The item specified by item is selected. The current first selected 
  3246.             item is returned as the result. 
  3247. -Select     The item specified by item is unselected. The current first 
  3248.             selected item is returned as the result. 
  3249. [+]Mark     The item specified by item is marked. The current first marked item 
  3250.             is returned as the result. 
  3251. -Mark       The item specified by item is unmarked. The current first marked 
  3252.             item is returned as the result. 
  3253. Cursor      The cursor is moved to the item specified by item The current item 
  3254.             containing the cursor is returned as the result. 
  3255. Next        The next selected item, if any, after the item specified by item is 
  3256.             returned. If no selected items follow item, then 0 is returned. 
  3257.  
  3258. Only the first letter of the second argument (i.e. S, M, C, or N) need be 
  3259. specified (e.g. "-M" is equivalent to "-Mark"). 
  3260.  
  3261. For example: 
  3262.  
  3263.    /* Mark the currently selected container item: */
  3264.    CALL container.Select container.Select(), "Mark"
  3265.  
  3266.  
  3267. ΓòÉΓòÉΓòÉ 9.11.40. Range ΓòÉΓòÉΓòÉ
  3268.  
  3269. Sets the range for the specified window, which must be a single-line edit 
  3270. control, horizontal or vertical scroll bar, spinbutton, value set or slider. 
  3271.  
  3272.  
  3273. ΓòÉΓòÉΓòÉ 9.11.41. Range (for a single-line edit control) ΓòÉΓòÉΓòÉ
  3274.  
  3275. result = [dialog.][control.]Range(
  3276.       length )
  3277.  
  3278. Length specifies the maximum number of characters that can be entered into the 
  3279. edit control. 
  3280.  
  3281. A result of 1 indicates the range was set successfully, and a result of 0 
  3282. indicates that an error occurred. 
  3283.  
  3284. For example: 
  3285.  
  3286.    /* Allow the user to enter up to 100 characters: */
  3287.    CALL entry.Range 100
  3288.  
  3289.  
  3290. ΓòÉΓòÉΓòÉ 9.11.42. Range (for a horizontal or vertical scroll bar) ΓòÉΓòÉΓòÉ
  3291.  
  3292. result = [dialog.][control.]Range(
  3293.       first, last [, visible] )
  3294.  
  3295. First and last specify the range of values that can be scrolled over. Visible 
  3296. specifies how many items within the range are visible (defaults to 1 if not 
  3297. specified). 
  3298.  
  3299. A result of 1 indicates the range was set successfully, and a result of 0 
  3300. indicates that an error occurred. 
  3301.  
  3302. For example: 
  3303.  
  3304.    /* Set up to scroll over a file of 100 lines, */
  3305.    /* with 25 lines visible at a time:           */
  3306.    CALL scroll.Range 1, 100, 25
  3307.  
  3308.  
  3309. ΓòÉΓòÉΓòÉ 9.11.43. Range (for a spinbutton) ΓòÉΓòÉΓòÉ
  3310.  
  3311. result = [dialog.][control.]Range(
  3312.       low, high )
  3313.       stem )
  3314.  
  3315. For a numeric spin button, low and high specify the range of values that can be 
  3316. selected. For a text spin button, stem specifies the name of a stem variable 
  3317. containing the values that can be selected. Stem.0 contains the number of 
  3318. values, and stem.1 through stem.n contain the actual values. 
  3319.  
  3320. A result of 1 indicates the range was set successfully, and a result of 0 
  3321. indicates that an error occurred. 
  3322.  
  3323. For example: 
  3324.  
  3325.    /* Set up to spin over the range of values: */
  3326.    /* "Mr", "Ms", and "Mrs"                    */
  3327.    value.0 = 3
  3328.    value.1 = "Mr"
  3329.    value.2 = "Ms"
  3330.    value.3 = "Mrs"
  3331.    CALL spin.Range "VALUE"
  3332.  
  3333.  
  3334. ΓòÉΓòÉΓòÉ 9.11.44. Range (for a value set) ΓòÉΓòÉΓòÉ
  3335.  
  3336. result = [dialog.][control.]Range(
  3337.       rows, columns )
  3338.  
  3339. Rows and columns specify the number of rows and columns in the value set 
  3340. control. 
  3341.  
  3342. A result of 1 indicates the range was set successfully, and a result of 0 
  3343. indicates that an error occurred. 
  3344.  
  3345. For example: 
  3346.  
  3347.    /* Set up a 2 x 8 color value set table: */
  3348.    CALL value.Range 2, 8
  3349.    DO row = 1 TO 2
  3350.       DO col = 1 TO 8
  3351.          CALL value.Item row, column, 8*(row-1)+col-1
  3352.       END
  3353.    END
  3354.  
  3355.  
  3356. ΓòÉΓòÉΓòÉ 9.11.45. Range (for a slider) ΓòÉΓòÉΓòÉ
  3357.  
  3358. result = [dialog.][control.]Range(
  3359.       ticks1 [, spacing1 [, ticks2 [, spacing2]]] )
  3360.  
  3361. Ticks1 specifies the number of tick marks on scale 1 of the slider. Spacing1 
  3362. specifies the spacing of the tick marks for scale 1 in pels. If 0 or omitted, 
  3363. the spacing is calculated automatically based on the size of the slider control 
  3364. and the number of ticks. 
  3365.  
  3366. Ticks2 specifies the number of tick marks on scale 2 of the slider. If omitted, 
  3367. scale 2 of the slider is not defined. Spacing2 specifies the spacing of the 
  3368. tick marks for scale 2 in pels. If 0 or omitted, the spacing is calculated 
  3369. automatically based on the size of the slider control and the number of ticks. 
  3370.  
  3371. A result of 1 indicates the range was set successfully, and a result of 0 
  3372. indicates that an error occurred. 
  3373.  
  3374. For example: 
  3375.  
  3376.    /* Set up a slider with Fahrenheit and Centigrade */
  3377.    /* scales between the freezing and boiling point  */
  3378.    /* of water: */
  3379.    CALL slider.Range 181, 0, 101, 0
  3380.  
  3381.  
  3382. ΓòÉΓòÉΓòÉ 9.11.46. Style ΓòÉΓòÉΓòÉ
  3383.  
  3384. oldStyle = [dialog.][control.]Style(
  3385.       [newStyle] )
  3386.  
  3387. Returns the style bits for the specified window, which can be any dialog or 
  3388. control. The result is always a four byte long string containing the 32 style 
  3389. bits for the specified control, with the low order bits in the first byte of 
  3390. the string and the high order bits in the last byte of the string. 
  3391.  
  3392. If newStyle is specified, the current style bits are replaced by newStyle, 
  3393. which must also be a four byte long string containing the new style bits in the 
  3394. same format. 
  3395.  
  3396. For example: 
  3397.  
  3398.    /* Turn a style bit on: */
  3399.    CALL control.Style BITOR( control.Style(), '01000000'X )
  3400.  
  3401.  
  3402. ΓòÉΓòÉΓòÉ 9.11.47. Font ΓòÉΓòÉΓòÉ
  3403.  
  3404. oldFont = [dialog.][control.]Font(
  3405.               [newFont] )
  3406.  
  3407. Returns the font for the specified window, which can be any dialog or control. 
  3408.  
  3409. If newFont is specified, the current font is replaced by newFont. 
  3410.  
  3411. Note:  A font is specified as a string of the form: size.name, where size is 
  3412. the point size, and name is the family name of the font (e.g. 10.Courier). 
  3413.  
  3414. For example: 
  3415.  
  3416.    /* Use a Courier font: */
  3417.    CALL myDialog.list.Font "10.Courier"
  3418.  
  3419.  
  3420. ΓòÉΓòÉΓòÉ 9.11.48. Color ΓòÉΓòÉΓòÉ
  3421.  
  3422. oldColor = [dialog.][control.]Color(
  3423.               [attribute] [, newColor] )
  3424.  
  3425. Returns the specified window color attribute for any dialog or control. 
  3426.  
  3427. Attribute specifies which window color attribute the function applies to. The 
  3428. attribute consists of a string of characters, each of which specifies a color 
  3429. attribute modifier. The defined attribute modifiers are as follows: 
  3430.  
  3431. +         Foreground (group 1) 
  3432. -         Background (group 1) 
  3433. A         Active (group 2) 
  3434. I         Inactive (group 2) 
  3435. H         Highlight (group 2) 
  3436. D         Disabled (group 2) 
  3437. T         Text (group 3) 
  3438. M         Menu (group 3) 
  3439. B         Border (group 3) 
  3440.  
  3441. The three groups represent more or less disjoint sets of attributes. In forming 
  3442. an attribute name, no more than one character from each group should be used. 
  3443. However, not all combinations of characters specify a valid color attribute. 
  3444. The list of valid color attribute character combinations is as follows: 
  3445.  
  3446. +         Foreground color 
  3447. -         Background color 
  3448. A         Active color 
  3449. I         Inactive color 
  3450. AT+       Active text foreground color 
  3451. AT-       Active text background color 
  3452. IT+       Inactive text foreground color 
  3453. IT-       Inactive text background color 
  3454. H+        Highlight foreground color 
  3455. H-        Highlight background color 
  3456. D+        Disabled foreground color 
  3457. D-        Disabled background color 
  3458. M+        Menu foreground color 
  3459. M-        Menu background color 
  3460. MH+       Menu highlight foreground color 
  3461. MH-       Menu highlight background color 
  3462. MD+       Menu disabled foreground color 
  3463. MD-       Menu disabled background color 
  3464. B         Border color 
  3465.  
  3466. Note:  The order of the characters in attribute does not matter. 
  3467.  
  3468. Not all windows support all color attributes. The most commonly supported 
  3469. attributes are foreground and background color. If attribute is omitted, it 
  3470. defaults to background color. 
  3471.  
  3472. If newColor is specified, the specified window color attribute is replaced by 
  3473. newColor. 
  3474.  
  3475. Note:  A color is specified as a string of the form: 
  3476.  
  3477.    #index
  3478. or #red green blue
  3479.  
  3480. where index is a color index, and red, green and blue are the color components 
  3481. of an RGB triplet (each component should be in the range 0 to 255). 
  3482.  
  3483. The result of the function is also one of these two forms, depending on which 
  3484. form was originally used to set the corresponding color attribute. 
  3485.  
  3486. Note:  If no color attribute has been specified for a control, the null string 
  3487. is returned as the result. 
  3488.  
  3489. For example: 
  3490.  
  3491.    /* Set an entry field to a black background with white text: */
  3492.    CALL myDialog.entry.Color , "#0 0 0"
  3493.    CALL myDialog.entry.Color "+", "#0"
  3494.  
  3495.  
  3496. ΓòÉΓòÉΓòÉ 9.11.49. ID ΓòÉΓòÉΓòÉ
  3497.  
  3498. id = [dialog.][control.]ID()
  3499.  
  3500. Returns the ID number of the specified window, which can be any dialog or 
  3501. control. 
  3502.  
  3503. Note:  The ID number is the same number assigned to the control or dialog in 
  3504. the editor using the Name window. 
  3505.  
  3506. For example: 
  3507.  
  3508.    /* Use the ID number as a digit: */
  3509.    num = 10 * num + ID()
  3510.  
  3511.  
  3512. ΓòÉΓòÉΓòÉ 9.11.50. Drag ΓòÉΓòÉΓòÉ
  3513.  
  3514. oldDragData = [dialog.][control.]Drag(
  3515.       [newDragData] )
  3516.  
  3517. Returns the drag information associated with the specifified window, which can 
  3518. be any control. 
  3519.  
  3520. Note:  The format of the function for container controls is described in the 
  3521. section on Drag (for a container). 
  3522.  
  3523. If newDragData is specified, the current drag information is replaced by 
  3524. newDragData. 
  3525.  
  3526. If newDragData is not the null string, then the specified window is enabled for 
  3527. dragging. That is, the user will be able to drag the control and drop it on 
  3528. other controls that have been enabled for dropping. 
  3529.  
  3530. If newDragData is the null string, the specified window can not be dragged. 
  3531. This is the initial default for all controls. 
  3532.  
  3533. The format of the drag string is: type[,type,...,type][:format][=data], where: 
  3534.  
  3535. type     is a string denoting the type of data being dragged (e.g. Plain text). 
  3536.          More than one type can be specified, if desired, with each succeeding 
  3537.          type separated by a comma. When the control is being dragged, it can 
  3538.          only be dropped on controls which accept at least one of the specified 
  3539.          types. The first type is called the true type, and some non-DrRexx 
  3540.          controls may only allow dropping controls whose true type they accept. 
  3541.  
  3542. format   is a string denoting the format of the data being dragged. While OS/2 
  3543.          allows any number of formats, DrRexx only supports two: STRING and 
  3544.          FILE. Only the first character of the format (i.e. S or F) need be 
  3545.          specified. If omitted, it defaults to STRING. 
  3546.  
  3547.          The STRING format denotes data passed as a REXX string (i.e. its 
  3548.          format is simply a REXX string). It is intended mainly for exchanging 
  3549.          information between DrRexx applications, although it can be supported 
  3550.          by non-DrRexx applications. 
  3551.  
  3552.          The FILE format denotes data passed in an OS/2 file (actually, only 
  3553.          the name of the file is passed as part of the drag and drop 
  3554.          operation). This format is compatible with files represented by the 
  3555.          Workplace Shell, and so may allow drag and drop operations between 
  3556.          DrRexx applications and some Workplace Shell objects. 
  3557.  
  3558. data     is a string containing the information to be passed to the target of a 
  3559.          drag and drop operation. If the format is STRING, it can be any REXX 
  3560.          string; if the format is FILE it should be the name of an OS/2 file. 
  3561.          If omitted, its default depends upon the type of control being 
  3562.          dragged. For most controls, the default is the value returned by the 
  3563.          Text function at the start of the drag operation. The exceptions to 
  3564.          this rule are as follows: 
  3565.  
  3566.    Value set 
  3567.              Defaults to the value of the item under the pointer at the start 
  3568.              of the drag operation (i.e. the value that would be returned by 
  3569.              the Item function for the value set item being pointed at). 
  3570.  
  3571.    List box 
  3572.              Defaults to the text of the currently selected item (i.e. the 
  3573.              value that would be returned by the Item function for the selected 
  3574.              item). If more than one item is selected, each item is dragged 
  3575.              separately. That is, the target will receive a Drop event for each 
  3576.              separate item. If no items are selected, dragging is disabled. 
  3577.  
  3578.    Single-line edit control, multi-line edit control 
  3579.              Defaults to the current contents of the edit control unless some 
  3580.              text is selected, in which case it defaults to the selected text. 
  3581.  
  3582.    Notebook, slider, horizontal scroll bar, vertical scroll bar 
  3583.              Defaults to the value that would be returned by the Select 
  3584.              function at the start of the drag operation. 
  3585.  
  3586. When a drag operation begins, DrRexx automatically determines the bitmap used 
  3587. to represent the data based on the type of control being dragged. For most 
  3588. controls, the bitmap is the same one used by DrDialog to represent the type of 
  3589. the control (e.g.  is used to represent a pushbutton control). However, there 
  3590. are a few cases where that rule does not apply: 
  3591.  
  3592. Value set     If the value set item being dragged is a bitmap (i.e. not a color 
  3593.               or text string), the item's bitmap is used. Otherwise the  bitmap 
  3594.               is used. 
  3595. Icon button   The bitmap that appears on the button is used. If the name of the 
  3596.               bitmap begins with '=' then the bitmap is left at its actual 
  3597.               size, and is not scaled to the size of an standard icon. In 
  3598.               addition, the icon button control is hidden at the beginning of a 
  3599.               drag operation. If the drag operation fails, the button is 
  3600.               automatically made visible again; otherwise it is the 
  3601.               application's responsibility to make the button visible again 
  3602.               (this allows the application to easily simulate the button 
  3603.               actually being dragged to a new location). 
  3604. Billboard     The bitmap that appears on the billboard is used. If the name of 
  3605.               the bitmap begins with '=' then the bitmap is left at its actual 
  3606.               size, and is not scaled to the size of an standard icon. In 
  3607.               addition, the billboard control is hidden at the beginning of a 
  3608.               drag operation. If the drag operation fails, the billboard is 
  3609.               automatically made visible again; otherwise it is the 
  3610.               application's responsibility to make the billboard visible again 
  3611.               (this allows the application to easily simulate the billboard 
  3612.               actually being dragged to a new location). 
  3613.  
  3614. Specifying a non-null drag string allows a DrRexx control to be dragged. In 
  3615. order for it to be successfully dropped, the target control must be enabled for 
  3616. dropping. For a DrRexx application this means that the Drop function has been 
  3617. issued for the target control with a non-null drop string. Dropping a 
  3618. compatible object on it will then generate a Drop event for the target control. 
  3619.  
  3620. Note:  It is possible for non-DrRexx applications to allow DrRexx controls to 
  3621. be dropped on them. 
  3622.  
  3623. For example: 
  3624.  
  3625.    /* Allow a pushbutton to be dragged: */
  3626.    CALL button.Drag "Command"
  3627.  
  3628.    /* Prevent a pushbutton from being dragged: */
  3629.    CALL button.Drag ""
  3630.  
  3631.    /* Allow a list box of file names to be dragged: */
  3632.    CALL list.Drag "Plain text:FILE"
  3633.  
  3634.    /* Define a draggable 'debug' control: */
  3635.    CALL text.Drag "REXX code:STRING=SAY Control()"
  3636.  
  3637.  
  3638. ΓòÉΓòÉΓòÉ 9.11.51. Drag (for a container) ΓòÉΓòÉΓòÉ
  3639.  
  3640. oldDragData = [dialog.][control.]Drag(
  3641.       item, [newDragData] )
  3642.  
  3643. Returns the drag information associated with the specified container control 
  3644. item. 
  3645.  
  3646. If newDragData is specified, the current drag information for item is replaced 
  3647. by newDragData. 
  3648.  
  3649. For more information about the format and meaning of the drag string, refer to 
  3650. the description of the Drag function that applies to other DrRexx control 
  3651. types. 
  3652.  
  3653. Note that, for a container control, if no data is specified in the drag string, 
  3654. the associated item label is passed as the data when the item is dragged. 
  3655.  
  3656. The major difference between a container control and other DrRexx controls that 
  3657. can be dragged is that a container control can specify drag information 
  3658. independently for each item it contains, not just globally for the container as 
  3659. a whole. 
  3660.  
  3661. Also, because a container may contain several draggable items, it is possible 
  3662. to drag more than one container item at a time. When the user begins a drag 
  3663. operation, DrRexx checks to see if the item to be dragged is selected. If not, 
  3664. only the item pointed at is dragged. If it is selected, then both the item 
  3665. pointed at and all other selected items in the container are dragged. 
  3666.  
  3667. Note:  If more than four items are selected, they will all be dragged, but only 
  3668. four bitmaps will appear in the drag image. The bitmaps used are the ones 
  3669. associated with the items being dragged. 
  3670.  
  3671. Refer also to the section on the Drop event for information about the data the 
  3672. target DrRexx control receives when the container items are dropped on it. 
  3673.  
  3674. For example: 
  3675.  
  3676.    /* Add a file item and make it draggable: */
  3677.    item = cnr.Add fileName, "BITMAP:#61"
  3678.    CALL item.Drag "Plain text:FILE"
  3679.  
  3680.    /* Disable the item from being dragged: */
  3681.    CALL item.Drag ""
  3682.  
  3683.    /* Create a command item and make it draggable: */
  3684.    item = cnr.Add "Merge", "BITMAP:#45"
  3685.    CALL item.Drag "Command"
  3686.  
  3687.  
  3688. ΓòÉΓòÉΓòÉ 9.11.52. Drop ΓòÉΓòÉΓòÉ
  3689.  
  3690. oldDropData = [dialog.][control.]Drop(
  3691.       [newDropData] )
  3692.  
  3693. Returns the drop information associated with the specifified window, which can 
  3694. be any control. 
  3695.  
  3696. Note:  The format of the function for container controls is described in the 
  3697. section on Drop (for a container). 
  3698.  
  3699. If newDropData is specified, the current drop information is replaced by 
  3700. newDropData. 
  3701.  
  3702. If newDropData is not the null string, then the specified window is enabled for 
  3703. dropping. That is, the user will be able to drop controls that are compatible 
  3704. with the drop criteria onto the specified control. 
  3705.  
  3706. If newDropData is the null string, the specified window can not be dropped on. 
  3707. This is the initial default for all controls. 
  3708.  
  3709. The format of the drop string is: type[,type,...,type][:format][=operation], 
  3710. where: 
  3711.  
  3712. type       is a string denoting the type of data that can be dropped (e.g. 
  3713.            Plain text). More than one type can be specified, if desired, with 
  3714.            each succeeding type separated by a comma. Only dragged objects 
  3715.            which have at least one matching type can be dropped on the control. 
  3716.            The special type ANY can also be used to indicate that any type of 
  3717.            data can be dropped on the control. If specified, it must be the 
  3718.            only type specified. 
  3719.  
  3720. format     is a string denoting the format of the data that can be dropped. 
  3721.            While OS/2 allows any number of formats, DrRexx only supports two: 
  3722.            STRING and FILE. In addition, ANY can be specified to indicate that 
  3723.            either format is acceptable. Only the first character of the format 
  3724.            (i.e. S, F or A) need be specified. If omitted, it defaults to 
  3725.            STRING. Only dragged objects which match the specified format can be 
  3726.            dropped on the control. 
  3727.  
  3728.            The STRING format denotes data passed as a REXX string (i.e. its 
  3729.            format is simply a REXX string). It is intended mainly for 
  3730.            exchanging information between DrRexx applications, although it can 
  3731.            be supported by non-DrRexx applications. 
  3732.  
  3733.            The FILE format denotes data passed in an OS/2 file (actually, only 
  3734.            the name of the file is passed as part of the drag and drop 
  3735.            operation). This format is compatible with files represented by the 
  3736.            Workplace Shell, and so may allow drag and drop operations between 
  3737.            DrRexx applications and some Workplace Shell objects. 
  3738.  
  3739. operation  is a string describing the type of operation that will be performed 
  3740.            if an object is dropped on the control. The possible values are: 
  3741.            MOVE, COPY, LINK or ANY. Only the first letter of the operation need 
  3742.            be specified (i.e. M, C, L or A). If omitted, the default is MOVE. 
  3743.            Only dragged objects which will allow the specified operation can be 
  3744.            dropped on the control. 
  3745.  
  3746.            Note:  No check is made to ensure that the specified operation 
  3747.            actually occurs when an object is dropped. 
  3748.  
  3749. Specifying a non-null drop string allows a DrRexx control to be dropped on. In 
  3750. order for it to be successfully dropped on, there must be a source object 
  3751. enabled for dragging. For a DrRexx application this means that the Drag 
  3752. function has been issued for the source control with a non-null drag string. 
  3753. Dropping a compatible object on it will then generate a Drop event for the 
  3754. target control. 
  3755.  
  3756. Note:  It is possible for non-DrRexx applications to enable controls that can 
  3757. be dropped on DrRexx controls. In particular, Workplace Shell file objects can 
  3758. typically be dropped on DrRexx controls which accept the FILE format and an 
  3759. appropriate type, or types (e.g. ANY, Plain text, DrRexx.RES). 
  3760.  
  3761. For example: 
  3762.  
  3763.    /* Allow user to drop customers or */
  3764.    /* commands onto a listbox:        */
  3765.    CALL list.Drop "Customer,Command"
  3766.  
  3767.    /* Disallow user from dropping onto a listbox: */
  3768.    CALL list.Drop ""
  3769.  
  3770.    /* Allow user to drop .BMP files onto a */
  3771.    /* billboard controls:                  */
  3772.    CALL bmp.Drop "Bitmap:FILE"
  3773.  
  3774.    /* Allow user to drop any kind of object */
  3775.    /* onto a list box:                      */
  3776.    CALL list.Drop "ANY:ANY=ANY"
  3777.  
  3778.  
  3779. ΓòÉΓòÉΓòÉ 9.11.53. Drop (for a container) ΓòÉΓòÉΓòÉ
  3780.  
  3781. oldDropData = [dialog.][control.]Drop(
  3782.       item, [newDropData] )
  3783.  
  3784. Returns the drop information associated with the specified container control 
  3785. item. If item is 0, it refers to the container itself, not a particular item in 
  3786. the container. That is, the empty space in a container not occcuped by a 
  3787. container item can also be the target for a drop operation if desired. 
  3788.  
  3789. If newDropData is specified, the current drop information for item is replaced 
  3790. by newDropData. 
  3791.  
  3792. For more information about the format and meaning of the drop string, refer to 
  3793. the description of the Drop function that applies to other DrRexx control 
  3794. types. 
  3795.  
  3796. The major difference between a container control and other DrRexx controls that 
  3797. can be dropped on is that a container control can specify drop information 
  3798. independently for each item it contains, not just globally for the container as 
  3799. a whole. 
  3800.  
  3801. Refer also to the section on the Drop event for information about the data the 
  3802. container control receives when an object is dropped on it. 
  3803.  
  3804. Note:  An object is dropped on a particular container item, or on the container 
  3805. itself. Target emphasis (i.e. a box drawn around the item or container) is 
  3806. drawn to indicate the current drop target. When an object is dropped on the 
  3807. container, one or more Drop events are generated for the container. Information 
  3808. in the associated EventData for each Drop event describes the particular item 
  3809. within the container that was dropped on. 
  3810.  
  3811. For example: 
  3812.  
  3813.    /* Create a command item to delete */
  3814.    /* customer entries:               */
  3815.    item = cnr.Add "Delete", "BITMAP:#54"
  3816.    CALL item.Drop "Customer"
  3817.  
  3818.    /* Disable the command item: */
  3819.    CALL item.Drop ""
  3820.  
  3821.    /* Create an item which allows DrDialog or */
  3822.    /* DrRexx .RES files to be dropped on it:  */
  3823.    item = cnr.Add "REView", "BITMAP:#23"
  3824.    CALL item.Drop "DrDialog.RES,DrRexx.RES:FILE"
  3825.  
  3826.  
  3827. ΓòÉΓòÉΓòÉ 9.11.54. IsDefault ΓòÉΓòÉΓòÉ
  3828.  
  3829. [dialog.][control.]IsDefault(
  3830.       [ "Object" | "Say" ] )
  3831.  
  3832. Makes the specified window the default window. 
  3833.  
  3834. If no argument is given, or the argument is Object, then the specified window 
  3835. becomes the default window for all subsequent window function calls with 
  3836. omitted references until the next event or call to IsDefault. 
  3837.  
  3838. If Say is specified as the argument, then all subsequent REXX SAY statements 
  3839. will direct their output to the specified window. This include implicit SAY 
  3840. output via the DrRexx SAY subcommand environment. 
  3841.  
  3842. Note:  Only the first letter of Object or Say need be specified. 
  3843.  
  3844. For example: 
  3845.  
  3846.    CALL myDialog.list.IsDefault
  3847.    DO i = 1 TO 10
  3848.       CALL Add i
  3849.    END
  3850.    CALL Select 0
  3851.  
  3852. is equivalent to: 
  3853.  
  3854.    DO i = 1 TO 10
  3855.       CALL myDialog.list.Add i
  3856.    END
  3857.    CALL myDialog.list.Select 0
  3858.  
  3859.  
  3860. ΓòÉΓòÉΓòÉ 9.11.55. Timer ΓòÉΓòÉΓòÉ
  3861.  
  3862. rc = [dialog.][control.]Timer(
  3863.       [interval] )
  3864.  
  3865. Starts or stops a timer for the specified window, which must be a dialog. 
  3866.  
  3867. If no argument is specified, the current timer, if any, is canceled (i.e. 
  3868. stopped). If an argument is specified, a timer is started which will generate a 
  3869. Timer event every interval milliseconds. An interval of 0 specifies that the 
  3870. timer events should be generated as fast as possible. 
  3871.  
  3872. A result of 1 indicates the request was successful and a result of 0 indicates 
  3873. the request failed. 
  3874.  
  3875. For example: 
  3876.  
  3877.    /* Generate a timer event once a second: */
  3878.    CALL myDialog.Timer 1000
  3879.    /* Cancel any previous timer: */
  3880.    CALL D100.Timer
  3881.  
  3882.  
  3883. ΓòÉΓòÉΓòÉ 9.11.56. View ΓòÉΓòÉΓòÉ
  3884.  
  3885. oldView = [dialog.][control.]View(
  3886.       ["Bitmap"  | "Name"   | "Flowedname" |
  3887.        "Text"    | "Column" | "Detail"     |
  3888.        "Outline" | "Hierarchy"]
  3889.       [, ["<|>_;"]title],
  3890.       [, cxBitmap, cyBitmap]
  3891.       [, expandBitmap, collapseBitmap] )
  3892.  
  3893. Returns the current view for the specified window, which must be a container 
  3894. control. 
  3895.  
  3896. The first argument specifies the view to use for the container: 
  3897.  
  3898. Omitted      No change is made to the current view. 
  3899. Bitmap       Display items as bitmaps with labels centered below them. 
  3900. Name         Display items as a single column of bitmaps with labels on the 
  3901.              right. 
  3902. Flowedname   Displays items as one or more columns of bitmaps with labels on 
  3903.              the right. The columns are filled top-to-bottom, left-to-right. 
  3904. Text         Displays items as a single column of labels, with no bitmaps. 
  3905. Text         Displays items as one or more columns of labels, with no bitmaps. 
  3906.              The columns are filled top-to-bottom, left-to-right. 
  3907. Detail       Displays items one per line, with each item consisting of one or 
  3908.              more columns of text or bitmaps. The container may also be split 
  3909.              into two independent groups of columns, each with its own scroll 
  3910.              bar and a movable separator between the two groups. 
  3911. Outline      Displays the items as an outline, with child items indented to the 
  3912.              right of parent items. Levels in the outline may be expanded or 
  3913.              collapsed independently. Unlike the Hierarchy view, no lines are 
  3914.              drawn to indicate the levels in the structure. Individual items in 
  3915.              the outline are displayed as bitmaps with their labels on the 
  3916.              right. 
  3917. Hierarchy    Displays the items as a hierarchy, with child items indented to 
  3918.              the right of parent items. Levels in the outline may be expanded 
  3919.              or collapsed independently. Lines are drawn to the left of the 
  3920.              items to indicate the levels in the structure. Individual items 
  3921.              are displayed as bitmaps with their labels on the right. 
  3922.  
  3923. Only the first letter (i.e. B, F, N, T, C, D, O or H) of the first argument 
  3924. need be specified. 
  3925.  
  3926. Title specifies the title to display at the top of the container. If not 
  3927. specified, the current title is not changed. The title may optionally begin 
  3928. with one or more of the following special formating characters: 
  3929.  
  3930. None  The title is centered with no separator line. 
  3931. <     The title is left justified. 
  3932. |     The title is centered. 
  3933. >     The title is right justified. 
  3934. _     A separator line is drawn between the title and the rest of the 
  3935.       container. 
  3936. ;     End of the formatting characters; the title begins with the next 
  3937.       character. This character is optional. If not specified, the title begins 
  3938.       with the first character not in this list. 
  3939.  
  3940. If title is specified, but consists only of formating characters (e.g. ";"), 
  3941. the current title, if any, is removed from the container. 
  3942.  
  3943. CxBitmap and cyBitmap specify the size to which all bitmaps displayed in the 
  3944. container are scaled. If not specified, no change is made to the current bitmap 
  3945. size. If both are specified as 0, the default system bitmap size is used. 
  3946.  
  3947. ExpandBitmap and collapseBitmap specify the bitmaps to use in the Outline or 
  3948. Hierarchy views to indicate that an item may be expanded or collapsed, 
  3949. respectively. If not specified, no change is made to the current bitmaps used 
  3950. for this purpose. If specified, both should be strings of the form: 
  3951. dll:#resource, where resource is the resource number of the bitmap within the 
  3952. DLL specified by dll (e.g. BITMAP:#50). Alternatively, the form: filename.BMP 
  3953. can also be used, where filename.BMP is the name of a file containing a bitmap 
  3954. in .BMP format. 
  3955.  
  3956. For example: 
  3957.  
  3958.    /* Display the hierarchy view of a container: */
  3959.    CALL container.View "H", "<_;Hierarchy view",,,
  3960.            "MYDLL:#1", "MYDLL:#2"
  3961.  
  3962.  
  3963. ΓòÉΓòÉΓòÉ 9.11.57. SetStem ΓòÉΓòÉΓòÉ
  3964.  
  3965. [dialog.][control.]SetStem(
  3966.       [stem]
  3967.       [, "[+/-]Select" | "[+/-]Mark" |
  3968.          "Format" | 0 | item] )
  3969.  
  3970. Sets a list of values for the specified window, which must be a container 
  3971. control. 
  3972.  
  3973. The list of values to be set are in the stem variable specified by stem. If 
  3974. stem is omitted, STEM is used as the name of the stem variable. 
  3975.  
  3976. Stem.0 contains the number of values in the list to be set. Stem.1 through 
  3977. stem.n contain the individual values to set. The type of values set depends on 
  3978. the second argument as follows: 
  3979.  
  3980. [+]Select   All items in stem are selected. 
  3981. -Select     All items in stem are unselected. 
  3982. [+]Mark     All items in stem are marked. 
  3983. -Mark       All items in stem are unmarked. 
  3984. Format      The items in stem are used to determine the number, format and 
  3985.             content of each column in the detail view of the container. The 
  3986.             number of columns of data is specified by stem.0. Stem.1 through 
  3987.             stem.n specify the format and content of columns 1 through n. Each 
  3988.             item is a string of 0 or more of the following characters: 
  3989.  
  3990.    =     Column will display a bitmap. If specified, column values should be 
  3991.          strings of the form: dll:#resource, where resource is the resource 
  3992.          number of the bitmap within the DLL specified by dll (e.g. 
  3993.          BITMAP:#50). Alternatively, the form: filename.BMP can also be used, 
  3994.          where filename.BMP is the name of a file containing a bitmap in .BMP 
  3995.          format. If not specified, the column data is assumed to be text. 
  3996.    ~     Column is invisible (i.e. not shown). 
  3997.    X     Column data is read-only. If not specified, the user can edit the data 
  3998.          in this column if it is not a bitmap. 
  3999.    .     This column is the last column in the left part of the split view. If 
  4000.          more than one column format string contains a period, the highest 
  4001.          numbered column is the one used as the split point. If no column 
  4002.          format string contains a period, the container will not display a 
  4003.          split view. 
  4004.    ^     Column data is top aligned. 
  4005.    V     Column data is bottom aligned. 
  4006.    -     (minus sign) Column data is vertically centered (the default). 
  4007.    <     Column data is left aligned. 
  4008.    >     Column data is right aligned. 
  4009.    |     Column data is horizontally centered (the default). 
  4010.    _     (underscore) Column title will have a separator drawn below it. 
  4011.    !     Column data will have a vertical separator drawn on the right. 
  4012.  
  4013.             Note:  If the detail view is used in an application, the format of 
  4014.             the column data must be specified prior to adding any items to the 
  4015.             container. Once the format has been specified, subsequent attempts 
  4016.             to change the following aspects of the format will be ignored: 
  4017.  
  4018.    o The number of columns 
  4019.    o The format of the column data (i.e. bitmap or text) 
  4020.  
  4021.             All other aspects of the column format can be changed as needed. 
  4022. 0           The values in stem are used to set the column titles. Note that the 
  4023.             column titles need not have the same format as the data they 
  4024.             describe (e.g. the column data could be text, while the column 
  4025.             title is a bitmap). If a title value begins with a "=", then the 
  4026.             title is assumed to be a bitmap specified by a string of the form: 
  4027.             =dll:#resource, where resource is the resource number of the bitmap 
  4028.             within the DLL specified by dll (e.g. =BITMAP:#50). Alternatively, 
  4029.             the form: =filename.BMP can also be used, where filename.BMP is the 
  4030.             name of a file containing a bitmap in .BMP format. If the title 
  4031.             value does not begin with a "=", the title is assumed to be text. 
  4032. item        The values in stem are used to set new values for the column data 
  4033.             of the item specified by item. 
  4034.  
  4035. If the second argument is omitted, it defaults to Select. 
  4036.  
  4037. For the first three cases, only the first letter of the second argument need by 
  4038. specified (i.e. S, M or F). 
  4039.  
  4040. For example: 
  4041.  
  4042.    /* Set up the detail view format: */
  4043.    format.0 = 3      /* 3 columns of data */
  4044.    format.1 = "=_!"  /* Bitmap, horizontal/vertical separators */
  4045.    format.2 = "._!"  /* Last column in split view, H/V seps */
  4046.    format.3 = ">_!"  /* Right aligned, H/V seps */
  4047.    CALL container.SetStem "FORMAT", "F"
  4048.  
  4049.    /* Set up the detail view titles: */
  4050.    title.0 = 3
  4051.    title.1 = "Type"
  4052.    title.2 = "Part #"
  4053.    title.3 = "Quantity"
  4054.    CALL container.SetStem "TITLE", 0
  4055.  
  4056.    /* Add an item: */
  4057.    item   = container.Add "Widget"
  4058.    data.0 = 3
  4059.    data.1 = "BITMAP:#27"
  4060.    data.2 = "12-456AQ"
  4061.    data.3 = "52"
  4062.    CALL container.SetStem "DATA", item
  4063.  
  4064.    /* Mark all currently selected items: */
  4065.    CALL container.GetStem "ITEM", "S"
  4066.    CALL container.SetStem "ITEM", "M"
  4067.  
  4068.  
  4069. ΓòÉΓòÉΓòÉ 9.11.58. GetStem ΓòÉΓòÉΓòÉ
  4070.  
  4071. [dialog.][control.]GetStem(
  4072.       [stem]
  4073.       [, "Select" | "Mark" | "Cursor" | 0 | item] )
  4074.  
  4075. Returns all requested values for the specified window, which must be a 
  4076. container control. 
  4077.  
  4078. The values are returned in the stem variable specified by stem. If stem is 
  4079. omitted, STEM is used as the name of the stem variable. 
  4080.  
  4081. On return, Stem.0 contains the number of values returned. Stem.1 through stem.n 
  4082. contain the individual values returned. The type of values returned depends on 
  4083. the second argument as follows: 
  4084.  
  4085. Select    All currently selected items are returned in stem. 
  4086. Mark      All currently marked items are returned in stem. 
  4087. Cursor    The item containing the cursor is returned in stem. 
  4088. 0         The column titles for the detail view are returned in stem. 
  4089. item      The values for each of the columns displayed in the detail view of 
  4090.           item are returned in stem. 
  4091.  
  4092. If the second argument is omitted, it defaults to Select. 
  4093.  
  4094. For the first three cases, only the first letter of the second argument need by 
  4095. specified (i.e. S, M or C). 
  4096.  
  4097. For example: 
  4098.  
  4099.    /* Delete all currently selected items: */
  4100.    CALL container.GetStem
  4101.    DO i = 1 TO stem.0
  4102.       CALL container.Delete stem.i
  4103.    END
  4104.  
  4105.    /* Mark all currently selected items: */
  4106.    CALL container.GetStem "ITEM", "S"
  4107.    CALL container.SetStem "ITEM", "M"
  4108.  
  4109.  
  4110. ΓòÉΓòÉΓòÉ 9.11.59. Controls ΓòÉΓòÉΓòÉ
  4111.  
  4112. [dialog.][control.]Controls(
  4113.       [stem] )
  4114.  
  4115. Returns the names of all controls for the specified window, which can be any 
  4116. dialog or control. 
  4117.  
  4118. The names are returned in the stem variable specified by stem. If stem is 
  4119. omitted, CONTROLS is used as the name of the stem variable. 
  4120.  
  4121. Stem.0 contains the number of names returned. Stem.1 through stem.n contain the 
  4122. names of each control for the specified window. If a control was not assigned a 
  4123. name using the DrDialog Name window, a name of the form Dnnn (for dialogs) or 
  4124. Cnnn (for controls), where nnn is the numeric ID of the dialog or control, is 
  4125. returned instead. Stem.1 always contains the name of the dialog. 
  4126.  
  4127. The function may be applied to a dialog or to any control contained within the 
  4128. dialog. In either case, the result returned is always the list of names for the 
  4129. entire dialog. 
  4130.  
  4131. For example: 
  4132.  
  4133.    /* Put all control names into a list box: */
  4134.    CALL myDialog.Controls
  4135.    DO i = 1 TO controls.0
  4136.       CALL myDialog.list.Add controls.i
  4137.    END
  4138.  
  4139.  
  4140. ΓòÉΓòÉΓòÉ 9.11.60. Classes ΓòÉΓòÉΓòÉ
  4141.  
  4142. [dialog.][control.]Classes(
  4143.       [stem] )
  4144.  
  4145. Returns the class names of all controls for the specified window, which can be 
  4146. any dialog or control. 
  4147.  
  4148. The class names are returned in the stem variable specified by stem. If stem is 
  4149. omitted, CLASSES is used as the name of the stem variable. 
  4150.  
  4151. Stem.0 contains the number of class names returned. Stem.1 through stem.n 
  4152. contain the class names of each control for the specified window. Stem.1 always 
  4153. contains the class name of the dialog (i.e. DIALOG). The order of the class 
  4154. names returned corresponds to the order of the names returned by the Controls 
  4155. function. 
  4156.  
  4157. The function may be applied to a dialog or to any control contained within the 
  4158. dialog. In either case, the result returned is always the list of class names 
  4159. for the entire dialog. 
  4160.  
  4161. For example: 
  4162.  
  4163.    /* Put all control names and classes into a list box: */
  4164.    CALL myDialog.Controls
  4165.    CALL myDialog.Classes
  4166.    DO i = 1 TO controls.0
  4167.       CALL myDialog.list.Add controls.i "is a" classes.i
  4168.    END
  4169.  
  4170.  
  4171. ΓòÉΓòÉΓòÉ 9.12. DrRexx menu functions ΓòÉΓòÉΓòÉ
  4172.  
  4173. Besides the window functions for interacting with Presentation Manager dialogs 
  4174. and controls, DrRexx also defines a number of functions for interacting with 
  4175. drop-down menus. Each of these menu functions is invoked using an object 
  4176. oriented syntax style similar to the window functions: 
  4177.  
  4178.    [dialog.][label.]function ( arguments )
  4179.  
  4180. where dialog refers to the name assigned to a dialog using the DrDialog Name 
  4181. window, and label refers to the label assigned to one or more menu items using 
  4182. the drop-down menu tool. For example, the statement: 
  4183.  
  4184.    CALL myDialog.Save.Disabled 1
  4185.  
  4186. might be used to disable all menu items labeled Save in the drop-down menu for 
  4187. dialog myDialog. 
  4188.  
  4189. Note:  Unlike window functions which apply to a single dialog or control, menu 
  4190. functions apply to all menu items with a specified label within a drop-down 
  4191. menu. 
  4192.  
  4193. The use of dialog names and labels is optional. If either or both are omitted, 
  4194. the following rules apply: 
  4195.  
  4196. o If only dialog is omitted, the function applies to all menu items with the 
  4197.   specified label within the dialog in which the event occurred. 
  4198.  
  4199. o If both dialog and label are omitted, the function applies to the menu item 
  4200.   generating the event. 
  4201.  
  4202. Note:  In the case of the Init procedure used to start a DrRexx application, 
  4203. there is no event. Therefore, any menu function calls it contains must use a 
  4204. fully qualified name. This is the only exception to the above set of rules. 
  4205.  
  4206. If no name was assigned to a dialog using the DrDialog Name window, Dnnn, where 
  4207. nnn is the ID number of the dialog, may be used in place of the dialog name 
  4208. (e.g. D100.Save.Disabled(1)). 
  4209.  
  4210. As with window functions, DrRexx also supports the following variation for 
  4211. invoking menu functions: 
  4212.  
  4213.    functionFOR( dialog, label [, arguments] )
  4214.  
  4215. where dialog and label are as described above. For example: 
  4216.  
  4217.    CALL DisabledFor "myDialog", "Save", 1
  4218.  
  4219. would be the equivalent way of writing the previous example using the alternate 
  4220. syntax style. 
  4221.  
  4222. The main use of this alternate style is in cases where the dialog and label 
  4223. name are determined dynamically at run-time, rather than statically at edit 
  4224. time. 
  4225.  
  4226. The defined menu functions are as follows: 
  4227.  
  4228. Name            Description 
  4229. MenuChecked     Get/Set a menu item's checked state 
  4230. MenuDisabled    Get/Set a menu item's disabled state 
  4231. MenuText        Get/Set a menu item's text 
  4232.  
  4233.  
  4234. ΓòÉΓòÉΓòÉ 9.12.1. MenuChecked ΓòÉΓòÉΓòÉ
  4235.  
  4236. oldState = [dialog.][label.]MenuChecked(
  4237.       [newState] )
  4238.  
  4239. Returns the current checked state of the specified menu items. A 0 means the 
  4240. menu items are not checked, and a 1 means they are checked. 
  4241.  
  4242. newState specifies the new checked state for all specified menu items, and 
  4243. should be one of the two values described above. 
  4244.  
  4245. For example: 
  4246.  
  4247.    /* Toggle the current menu item's checked state: */
  4248.    CALL MenuChecked 1 - MenuChecked()
  4249.  
  4250.    /* 'Check' a menu item: */
  4251.    CALL myDialog.Attached.MenuChecked 1
  4252.  
  4253.  
  4254. ΓòÉΓòÉΓòÉ 9.12.2. MenuDisabled ΓòÉΓòÉΓòÉ
  4255.  
  4256. oldState = [dialog.][label.]MenuDisabled(
  4257.       [newState] )
  4258.  
  4259. Returns the current disabled state of the specified menu items. A 0 means the 
  4260. menu items are not disabled, and a 1 means they are disabled. 
  4261.  
  4262. newState specifies the new disabled state for all specified menu items, and 
  4263. should be one of the two values described above. 
  4264.  
  4265. For example: 
  4266.  
  4267.    /* Disable all 'save' menu options: */
  4268.    CALL Save.Disabled 1
  4269.  
  4270.  
  4271. ΓòÉΓòÉΓòÉ 9.12.3. MenuText ΓòÉΓòÉΓòÉ
  4272.  
  4273. oldText = [dialog.][label.]MenuText(
  4274.       [newText] )
  4275.  
  4276. Returns the current text of the specified menu items. 
  4277.  
  4278. newText specifies the new text for all specified menu items. A '~' character in 
  4279. newText can be used to specify a keyboard accelerator (e.g. "~Save" specifies 
  4280. that alt-S is the keyboard accelerator character for this menu item). 
  4281.  
  4282. For example: 
  4283.  
  4284.    /* Include the file name in the save option: */
  4285.    CALL Save.Text "~Save" filename
  4286.  
  4287.  
  4288. ΓòÉΓòÉΓòÉ 9.13. Other DrRexx functions ΓòÉΓòÉΓòÉ
  4289.  
  4290. In addition to the window functions, the DrRexx run-time environment also 
  4291. defines the following additional REXX functions: 
  4292.  
  4293. Name            Description 
  4294. EventData       Return the data associated with the current event 
  4295. Event           Return the name of the current event 
  4296. Control         Return the name of the current event's control 
  4297. Class           Return the class of the current event's control 
  4298. Dialog          Return the name of the current event's dialog 
  4299. Dialogs         Return the names of all defined dialogs 
  4300. FilePrompt      Return the name of a file selected using the system file dialog 
  4301. Clipboard       Get/Set the contents of the system clipboard 
  4302. ScreenSize      Returns the size of the display screen 
  4303. DrRexxVersion   Get the DrRexx version 
  4304.  
  4305.  
  4306. ΓòÉΓòÉΓòÉ 9.13.1. EventData ΓòÉΓòÉΓòÉ
  4307.  
  4308. EventData( [stem] )
  4309.  
  4310. Returns the list of data items associated with the current event in the stem 
  4311. variable specified by stem. If stem is omitted, it defaults to EVENTDATA. 
  4312.  
  4313. The number of data items returned is specified by stem.0. Stem.1 through stem.n 
  4314. contain the individual data items associated with the current event. For a 
  4315. description of the data returned by a specific event for a particular control 
  4316. type, refer to the Controls section. 
  4317.  
  4318. For example: 
  4319.  
  4320.    /* Mark each container item when the cursor */
  4321.    /* touches it: */
  4322.    CALL EventData "DATA"
  4323.    IF data.2 = "+CURSOR" THEN CALL Select data.1, "MARK"
  4324.  
  4325.  
  4326. ΓòÉΓòÉΓòÉ 9.13.2. Event ΓòÉΓòÉΓòÉ
  4327.  
  4328. event = Event()
  4329.  
  4330. Returns the name of the current event (e.g. "Click"). 
  4331.  
  4332. If no event has occurred yet (i.e. the Init function is being processed), the 
  4333. null string is returned. 
  4334.  
  4335. For example: 
  4336.  
  4337.    /* Display the current event: */
  4338.    SAY Event() "occurred for" Control() "("Class()")"
  4339.  
  4340.  
  4341. ΓòÉΓòÉΓòÉ 9.13.3. Control ΓòÉΓòÉΓòÉ
  4342.  
  4343. name = Control()
  4344.  
  4345. Returns the name of the control generating the current event (e.g. "list"). 
  4346.  
  4347. If no event has occurred yet (i.e. the Init function is being processed), the 
  4348. null string is returned. 
  4349.  
  4350. For example: 
  4351.  
  4352.    /* Display the current event: */
  4353.    SAY Event() "occurred for" Control() "("Class()")"
  4354.  
  4355.  
  4356. ΓòÉΓòÉΓòÉ 9.13.4. Class ΓòÉΓòÉΓòÉ
  4357.  
  4358. class = Class()
  4359.  
  4360. Returns the class of the control generating the current event (e.g. "LISTBOX"). 
  4361.  
  4362. If no event has occurred yet (i.e. the Init function is being processed), the 
  4363. null string is returned. 
  4364.  
  4365. For example: 
  4366.  
  4367.    /* Display the current event: */
  4368.    SAY Event() "occurred for" Control() "("Class()")"
  4369.  
  4370.  
  4371. ΓòÉΓòÉΓòÉ 9.13.5. Dialog ΓòÉΓòÉΓòÉ
  4372.  
  4373. name = Dialog()
  4374.  
  4375. Returns the name of the dialog containing the control which generated the 
  4376. current event (e.g. "password"). 
  4377.  
  4378. If no event has occurred yet (i.e. the Init function is being processed), the 
  4379. null string is returned. 
  4380.  
  4381. For example: 
  4382.  
  4383.    /* Display the current event: */
  4384.    SAY Event() "occurred for" Control() "in" Dialog()
  4385.  
  4386.  
  4387. ΓòÉΓòÉΓòÉ 9.13.6. Dialogs ΓòÉΓòÉΓòÉ
  4388.  
  4389. Dialogs( [stem] )
  4390.  
  4391. Returns the names of all defined dialogs. 
  4392.  
  4393. The names are returned in the stem variable specified by stem. If stem is 
  4394. omitted, DIALOGS is used as the name of the stem variable. 
  4395.  
  4396. Stem.0 contains the number of names returned. Stem.1 through stem.n contain the 
  4397. names of each defined dialog. Note that the list includes dialogs currently 
  4398. open as well as those defined but not currently open. 
  4399.  
  4400. For example: 
  4401.  
  4402.    /* Put all dialog names into a list box: */
  4403.    CALL Dialogs
  4404.    DO i = 1 TO dialogs.0
  4405.       CALL myDialog.list.Add dialogs.i
  4406.    END
  4407.  
  4408.  
  4409. ΓòÉΓòÉΓòÉ 9.13.7. FilePrompt ΓòÉΓòÉΓòÉ
  4410.  
  4411. file = FilePrompt( [pattern] [, title] [, ok]
  4412.                    [, "Open" | "Save"] )
  4413.  
  4414. Prompts the user for the name of a file using the standard system file dialog, 
  4415. and returns the name of the file selected as the result. 
  4416.  
  4417. Pattern specifies the type of file the user should select, and may contain a 
  4418. path or wildcard characters (i.e. '*' or '?'). If pattern is not specified, it 
  4419. defaults to "*.*". 
  4420.  
  4421. Title specifies the text to display on the file dialog title bar. If not 
  4422. specified, it defaults to "Open file..." for a file open dialog, and "Save file 
  4423. as..." for a file save dialog. 
  4424.  
  4425. Ok specifies the label for the button used to accept the current file as the 
  4426. file to return as the result. If not specified, it defaults to "Open" for a 
  4427. file open dialog, and "Save" for a file save dialog. 
  4428.  
  4429. The fourth argument specifies whether the file dialog is for opening a file 
  4430. (i.e. "Open"), or saving a file (i.e. "Save"). Only the first character (i.e. 
  4431. "O" or "S") need be specified. If omitted, it defaults to being a file open 
  4432. dialog. 
  4433.  
  4434. If the user selects a file using the file dialog, the name of the file is 
  4435. returned as the result. If the user cancels the file dialog without selecting a 
  4436. file, the null string is returned as the result. 
  4437.  
  4438. For example: 
  4439.  
  4440.    /* Prompt the user for the name of a .BMP file: */
  4441.    file = FilePrompt( "*.BMP", "Enter name of bitmap file to open" )
  4442.  
  4443.  
  4444. ΓòÉΓòÉΓòÉ 9.13.8. Clipboard ΓòÉΓòÉΓòÉ
  4445.  
  4446. result = Clipboard( [text] )
  4447.  
  4448. Returns the current contents of the system clipboard. 
  4449.  
  4450. If text is specified, it replaces the current contents of the system clipboard. 
  4451.  
  4452. For example: 
  4453.  
  4454.    /* Put current list selection into the clipboard: */
  4455.    CALL Clipboard list.Item( list.Select() )
  4456.  
  4457.  
  4458. ΓòÉΓòÉΓòÉ 9.13.9. ScreenSize ΓòÉΓòÉΓòÉ
  4459.  
  4460. result = ScreenSize()
  4461.  
  4462. Returns the size of the display screen in the form: width height (e.g. "1024 
  4463. 768"). 
  4464.  
  4465. For example: 
  4466.  
  4467.    /* Center a window on the screen: */
  4468.    PARSE VALUE dialog.Position() WITH x y cx cy
  4469.    PARSE VALUE ScreenSize() WITH dx dy
  4470.    CALL dialog.Position (dx - cx)%2, (dy - cy)%2, cx, cy
  4471.  
  4472.  
  4473. ΓòÉΓòÉΓòÉ 9.13.10. DrRexxVersion ΓòÉΓòÉΓòÉ
  4474.  
  4475. result = DrRexxVersion()
  4476.  
  4477. Returns the version of DrRexx in the form: v.vv mm/dd/yy exefile (e.g. "2.10 
  4478. 09/18/93 D:\DRDIALOG\DRREXX.EXE"). 
  4479.  
  4480. For example: 
  4481.  
  4482.    /* Display the version of DrRexx: */
  4483.    CALL display.Text DrRexxVersion()
  4484.  
  4485.  
  4486. ΓòÉΓòÉΓòÉ 10. DrDialog controls ΓòÉΓòÉΓòÉ
  4487.  
  4488. DrDialog supports the following types of controls: 
  4489.  
  4490. o Dialog control 
  4491. o Push button control 
  4492. o Check box control 
  4493. o Radio button control 
  4494. o Text box control 
  4495. o Notebook control 
  4496. o Container control 
  4497. o List box control 
  4498. o Single-line edit control 
  4499. o Multi-line edit control 
  4500. o Combo box control 
  4501. o Spin button control 
  4502. o Value set control 
  4503. o Vertical scroll bar control 
  4504. o Horizontal scroll bar control 
  4505. o Slider control 
  4506. o Group box control 
  4507. o Frame control 
  4508. o Rectangle control 
  4509. o Billboard control 
  4510. o Canvas control 
  4511. o Paint control 
  4512. o Bitmap button control 
  4513. o Bag button control 
  4514. o Turtle control 
  4515. o Bitmap control 
  4516. o User defined control 
  4517. o Marquee control 
  4518.  
  4519.  
  4520. ΓòÉΓòÉΓòÉ 10.1. Dialog control ΓòÉΓòÉΓòÉ
  4521.  
  4522. A dialog is not actually a control, but nevertheless has a set of defined 
  4523. events and functions similar to a control. For that reason, it is described 
  4524. here as if it were a control. 
  4525.  
  4526. The events defined for a dialog are: 
  4527.  
  4528. Event       Description 
  4529. Init        The dialog is being initialized when the dialog is opened. This is 
  4530.             always the last 'Init' event handler run when a dialog is opened 
  4531.             (i.e. it is run after the 'Init' event handlers defined for any 
  4532.             controls within the dialog). 
  4533. Exit        The dialog has been closed 
  4534. Timer       A time interval set by the 'Timer' function has expired 
  4535. Move        The dialog has moved 
  4536. Size        The dialog has changed size 
  4537. GetFocus    The dialog has been given the input focus 
  4538. LoseFocus   The dialog has lost the input focus 
  4539. Any         An event not handled by a control specific or class handler for the 
  4540.             dialog has occurred 
  4541.  
  4542. The DrRexx window functions that can be applied to a dialog are: 
  4543.  
  4544. Open        Open (i.e. create) a new dialog 
  4545. Close       Close (i.e. destroy) a dialog 
  4546. Owner       Get/Set a dialog's owner 
  4547. Frame       Get the size of a dialog's frame 
  4548. Timer       Start/stop a dialog timer 
  4549. Text        Get/Set a dialog's title bar text 
  4550. Style       Get/Set a dialog's style mask 
  4551. Font        Get/Set a dialog's title bar font 
  4552. Color       Get/Set a dialog attribute's color 
  4553. ID          Get a dialog's window ID 
  4554. Position    Get/Set a dialog's position and size 
  4555. Hide        Hide a dialog 
  4556. Show        Show a dialog 
  4557. Visible     Get/Set a dialog's visibility state 
  4558. Top         Make a dialog the topmost window 
  4559. Bottom      Make a dialog the bottommost window 
  4560. Enable      Enable a dialog 
  4561. Disable     Disable a dialog 
  4562. Enabled     Get/Set a dialog's enabled state 
  4563. Focus       Give a dialog the input focus 
  4564. IsDefault   Make a dialog the current default control 
  4565. Controls    Get a list of all dialog controls 
  4566. Classes     Get a list of all dialog control classes 
  4567.  
  4568.  
  4569. ΓòÉΓòÉΓòÉ 10.2. Push button control ΓòÉΓòÉΓòÉ
  4570.  
  4571. Creates a pushbutton control. 
  4572.  
  4573. The events defined for a pushbutton control are: 
  4574.  
  4575. Event       Description 
  4576. Click       The user has clicked the pushbutton 
  4577. Init        The pushbutton is being initialized when the dialog is opened 
  4578. Drop        An object has been dropped on the pushbutton. Refer to the Drop 
  4579.             event section for details about the information that can be 
  4580.             retrieved for the event using the EventData function. 
  4581.  
  4582. The DrRexx window functions that can be applied to a push button control are: 
  4583.  
  4584. Select      Get/Set a push button control's select state 
  4585. Text        Get/Set a push button control's text 
  4586. Style       Get/Set a push button control's style mask 
  4587. Font        Get/Set a push button control's text font 
  4588. Color       Get/Set a push button control attribute's color 
  4589. ID          Get a push button control's window ID 
  4590. Position    Get/Set a push button control's position and size 
  4591. Hide        Hide a push button control 
  4592. Show        Show a push button control 
  4593. Visible     Get/Set a push button control's visibility state 
  4594. Top         Make a push button the topmost control 
  4595. Bottom      Make a push button the bottommost control 
  4596. Enable      Enable a push button control 
  4597. Disable     Disable a push button control 
  4598. Enabled     Get/Set a push button control's enabled state 
  4599. Focus       Give a push button control the input focus 
  4600. Drag        Enable/Disable dragging a push button control 
  4601. Drop        Enable/Disable dropping on a push button control 
  4602. IsDefault   Make a push button control the current default control 
  4603. Controls    Get a list of all dialog controls 
  4604. Classes     Get a list of all dialog control classes 
  4605.  
  4606.  
  4607. ΓòÉΓòÉΓòÉ 10.3. Check box control ΓòÉΓòÉΓòÉ
  4608.  
  4609. Creates a check box control. 
  4610.  
  4611. The events defined for a check box control are: 
  4612.  
  4613. Event       Description 
  4614. Click       The user has clicked the check box 
  4615. Init        The check box is being initialized when the dialog is opened 
  4616. Drop        An object has been dropped on the check box. Refer to the Drop 
  4617.             event section for details about the information that can be 
  4618.             retrieved for the event using the EventData function. 
  4619.  
  4620. The DrRexx window functions that can be applied to a check box control are: 
  4621.  
  4622. Select      Get/Set a check box control's select state 
  4623. Text        Get/Set a check box control's text 
  4624. Style       Get/Set a check box control's style mask 
  4625. Font        Get/Set a check box control's text font 
  4626. Color       Get/Set a check box control attribute's color 
  4627. ID          Get a check box control's window ID 
  4628. Position    Get/Set a check box control's position and size 
  4629. Hide        Hide a check box control 
  4630. Show        Show a check box control 
  4631. Visible     Get/Set a check box control's visibility state 
  4632. Top         Make a check box the topmost control 
  4633. Bottom      Make a check box the bottommost control 
  4634. Enable      Enable a check box control 
  4635. Disable     Disable a check box control 
  4636. Enabled     Get/Set a check box control's enabled state 
  4637. Focus       Give a check box control the input focus 
  4638. Drag        Enable/Disable dragging a check box control 
  4639. Drop        Enable/Disable dropping on a check box control 
  4640. IsDefault   Make a check box control the current default control 
  4641. Controls    Get a list of all dialog controls 
  4642. Classes     Get a list of all dialog control classes 
  4643.  
  4644.  
  4645. ΓòÉΓòÉΓòÉ 10.4. Radio button control ΓòÉΓòÉΓòÉ
  4646.  
  4647. Creates a radio button control. 
  4648.  
  4649. The events defined for a radio button control are: 
  4650.  
  4651. Event       Description 
  4652. Click       The user has clicked the radio button 
  4653. Init        The radio button is being initialized when the dialog is opened 
  4654. Drop        An object has been dropped on the radio button. Refer to the Drop 
  4655.             event section for details about the information that can be 
  4656.             retrieved for the event using the EventData function. 
  4657.  
  4658. The DrRexx window functions that can be applied to a radio button control are: 
  4659.  
  4660. Select      Get/Set a radio button controls's select state 
  4661. Text        Get/Set a radio button control's text 
  4662. Style       Get/Set a radio button control's style mask 
  4663. Font        Get/Set a radio button control's text font 
  4664. Color       Get/Set a radio button control attribute's color 
  4665. ID          Get a radio button control's window ID 
  4666. Position    Get/Set a radio button control's position and size 
  4667. Hide        Hide a radio button control 
  4668. Show        Show a radio button control 
  4669. Visible     Get/Set a radio button control's visibility state 
  4670. Top         Make a radio button the topmost control 
  4671. Bottom      Make a radio button the bottommost control 
  4672. Enable      Enable a radio button control 
  4673. Disable     Disable a radio button control 
  4674. Enabled     Get/Set a radio button control's enabled state 
  4675. Focus       Give a radio button control the input focus 
  4676. Drag        Enable/Disable dragging a radio button control 
  4677. Drop        Enable/Disable dropping on a radio button control 
  4678. IsDefault   Make a radio button control the current default control 
  4679. Controls    Get a list of all dialog controls 
  4680. Classes     Get a list of all dialog control classes 
  4681.  
  4682.  
  4683. ΓòÉΓòÉΓòÉ 10.5. Text control ΓòÉΓòÉΓòÉ
  4684.  
  4685. Creates a static text control. 
  4686.  
  4687. The events defined for a text control are: 
  4688.  
  4689. Event       Description 
  4690. Init        The text control is being initialized when the dialog is opened 
  4691. Drop        An object has been dropped on the text control. Refer to the Drop 
  4692.             event section for details about the information that can be 
  4693.             retrieved for the event using the EventData function. 
  4694.  
  4695. The DrRexx window functions that can be applied to a text control are: 
  4696.  
  4697. Text        Get/Set a text control's text 
  4698. Style       Get/Set a text control's style mask 
  4699. Font        Get/Set a text control's text font 
  4700. Color       Get/Set a text control attribute's color 
  4701. ID          Get a text control's window ID 
  4702. Position    Get/Set a text control's position and size 
  4703. Hide        Hide a text control 
  4704. Show        Show a text control 
  4705. Visible     Get/Set a text control's visibility state 
  4706. Top         Make a text control the topmost control 
  4707. Bottom      Make a text control the bottommost control 
  4708. Enable      Enable a text control 
  4709. Disable     Disable a text control 
  4710. Enabled     Get/Set a text control's enabled state 
  4711. Focus       Give a text control the input focus 
  4712. Drag        Enable/Disable dragging a text control 
  4713. Drop        Enable/Disable dropping on a text control 
  4714. IsDefault   Make a text control the current default control 
  4715. Controls    Get a list of all dialog controls 
  4716. Classes     Get a list of all dialog control classes 
  4717.  
  4718.  
  4719. ΓòÉΓòÉΓòÉ 10.6. Notebook control ΓòÉΓòÉΓòÉ
  4720.  
  4721. Creates a notebook control. 
  4722.  
  4723. The events defined for a notebook control are: 
  4724.  
  4725. Event       Description 
  4726. Select      A notebook page has been selected 
  4727. Size        The notebook control has been resized 
  4728. Delete      A notebook page has been deleted 
  4729. Init        The notebook control is being initialized when the dialog is opened 
  4730. Help        The notebook control has been requested to display help 
  4731. Drop        An object has been dropped on the notebook. Refer to the Drop event 
  4732.             section for details about the information that can be retrieved for 
  4733.             the event using the EventData function. 
  4734.  
  4735. The DrRexx window functions that can be applied to a notebook control are: 
  4736.  
  4737. Add         Add a new notebook page 
  4738. Delete      Delete one or all notebook pages 
  4739. Select      Get/Set the current notebook page 
  4740. Item        Get/Set a notebook page item's value 
  4741. Style       Get/Set a notebook control's style mask 
  4742. Font        Get/Set a notebook control's text font 
  4743. Color       Get/Set a notebook control attribute's color 
  4744. ID          Get a notebook control's window ID 
  4745. Position    Get/Set a notebook control's position and size 
  4746. Hide        Hide a notebook control 
  4747. Show        Show a notebook control 
  4748. Visible     Get/Set a notebook control's visibility state 
  4749. Top         Make a notebook the topmost control 
  4750. Bottom      Make a notebook the bottommost control 
  4751. Enable      Enable a notebook control 
  4752. Disable     Disable a notebook control 
  4753. Enabled     Get/Set a notebook control's enabled state 
  4754. Focus       Give a notebook control the input focus 
  4755. Drag        Enable/Disable dragging a notebook control 
  4756. Drop        Enable/Disable dropping on a notebook control 
  4757. IsDefault   Make a notebook control the current default control 
  4758. Controls    Get a list of all dialog controls 
  4759. Classes     Get a list of all dialog control classes 
  4760.  
  4761.  
  4762. ΓòÉΓòÉΓòÉ 10.7. Container control ΓòÉΓòÉΓòÉ
  4763.  
  4764. Creates a container control. 
  4765.  
  4766. The events defined for a container control are: 
  4767.  
  4768. Event       Description 
  4769. Changed     The user has changed the value of a container item field. 
  4770.  
  4771.             The EventData function can retrieve the following information about 
  4772.             the event: 
  4773.  
  4774.    EventData.1 Item that has changed. 
  4775.    EventData.2 Field within item that has changed. Possible values are VALUE 
  4776.                for the item value (i.e. label), or 1 through n for detail 
  4777.                fields 1 through n. 
  4778. Enter       The user has pressed Enter or double-clicked in the container. 
  4779.  
  4780.             The EventData function can retrieve the following information about 
  4781.             the event: 
  4782.  
  4783.    EventData.1 Item that was double-clicked on (or 0 if the pointer was not 
  4784.                over an item in the container). 
  4785. Select      The emphasis (select, mark or cursor) of a container item has 
  4786.             changed. 
  4787.  
  4788.             The EventData function can retrieve the following information about 
  4789.             the event: 
  4790.  
  4791.    EventData.1  Item whose emphasis has changed. 
  4792.    EventData.2  String indicating how the emphasis has changed: 
  4793.  
  4794.       +SELECT     Item was selected. 
  4795.       -SELECT     Item was unselected. 
  4796.       +MARK       Item was marked. 
  4797.       -MARK       Item was unmarked. 
  4798.       +CURSOR     Item has the cursor. 
  4799.       -CURSOR     Item has lost the cursor. 
  4800. Init        The container control is being initialized when the dialog is 
  4801.             opened 
  4802. Scroll      The container control has scrolled 
  4803. GetFocus    The container control has been given the input focus 
  4804. LoseFocus   The container control has lost the input focus 
  4805. Drop        An object has been dropped on the container control. Refer to the 
  4806.             Drop event section for details about the information that can be 
  4807.             retrieved for the event using the EventData function. 
  4808.  
  4809. The DrRexx window functions that can be applied to a container control are: 
  4810.  
  4811. Add         Add a new container item 
  4812. Delete      Delete one or all container items 
  4813. Select      Get/Set the select state of a container item 
  4814. Item        Get/Set a container item field's value 
  4815. View        Get/Set the view of a container 
  4816. SetStem     Set a list of values for a container 
  4817. GetStem     Get a list of values for a container 
  4818. Style       Get/Set a container control's style mask 
  4819. Font        Get/Set a container control's text font 
  4820. Color       Get/Set a container control attribute's color 
  4821. ID          Get a container control's window ID 
  4822. Position    Get/Set a container control's position and size 
  4823. Hide        Hide a container control 
  4824. Show        Show a container control 
  4825. Visible     Get/Set a container control's visibility state 
  4826. Top         Make a container the topmost control 
  4827. Bottom      Make a container the bottommost control 
  4828. Enable      Enable a container control 
  4829. Disable     Disable a container control 
  4830. Enabled     Get/Set a container control's enabled state 
  4831. Focus       Give a container control the input focus 
  4832. Drag        Enable/Disable dragging a container control 
  4833. Drop        Enable/Disable dropping on a container control 
  4834. IsDefault   Make a container control the current default control 
  4835. Controls    Get a list of all dialog controls 
  4836. Classes     Get a list of all dialog control classes 
  4837.  
  4838.  
  4839. ΓòÉΓòÉΓòÉ 10.8. List box control ΓòÉΓòÉΓòÉ
  4840.  
  4841. Creates a list box control. 
  4842.  
  4843. The events defined for a list box control are: 
  4844.  
  4845. Event       Description 
  4846. Enter       The user has pressed Enter or double-clicked on a list box entry 
  4847. Select      The user has selected a list box entry 
  4848. Init        The list box control is being initialized when the dialog is opened 
  4849. Scroll      The list box control has scrolled horizontally 
  4850. GetFocus    The list box control has been given the input focus 
  4851. LoseFocus   The list box control has lost the input focus 
  4852. Drop        An object has been dropped on the list box control. Refer to the 
  4853.             Drop event section for details about the information that can be 
  4854.             retrieved for the event using the EventData function. 
  4855.  
  4856. The DrRexx window functions that can be applied to a list box control are: 
  4857.  
  4858. Add         Add a new list box item 
  4859. Delete      Delete one or all list box items 
  4860. Select      Get/Set the select state of a list box item 
  4861. Item        Get/Set a list box item's value 
  4862. Style       Get/Set a list box control's style mask 
  4863. Font        Get/Set a list box control's text font 
  4864. Color       Get/Set a list box control attribute's color 
  4865. ID          Get a list box control's window ID 
  4866. Position    Get/Set a list box control's position and size 
  4867. Hide        Hide a list box control 
  4868. Show        Show a list box control 
  4869. Visible     Get/Set a list box control's visibility state 
  4870. Top         Make a list box the topmost control 
  4871. Bottom      Make a list box the bottommost control 
  4872. Enable      Enable a list box control 
  4873. Disable     Disable a list box control 
  4874. Enabled     Get/Set a list box control's enabled state 
  4875. Focus       Give a list box control the input focus 
  4876. Drag        Enable/Disable dragging a list box control 
  4877. Drop        Enable/Disable dropping on a list box control 
  4878. IsDefault   Make a list box control the current default control 
  4879. Controls    Get a list of all dialog controls 
  4880. Classes     Get a list of all dialog control classes 
  4881.  
  4882.  
  4883. ΓòÉΓòÉΓòÉ 10.9. Single line edit control ΓòÉΓòÉΓòÉ
  4884.  
  4885. Creates a single-line entry field control. 
  4886.  
  4887. The events defined for a single line edit control are: 
  4888.  
  4889. Event       Description 
  4890. Changed     The edit control contents have changed 
  4891. Init        The edit control is being initialized when the dialog is opened 
  4892. Scroll      The edit control has scrolled horizontally 
  4893. GetFocus    The edit control has been given the input focus 
  4894. LoseFocus   The edit control has lost the input focus 
  4895. Drop        An object has been dropped on the edit control. Refer to the Drop 
  4896.             event section for details about the information that can be 
  4897.             retrieved for the event using the EventData function. 
  4898. Overflow    The edit control has overflowed 
  4899.  
  4900. The DrRexx window functions that can be applied to a single line edit control 
  4901. are: 
  4902.  
  4903. Select      Get/Set the selection bounds of a single line edit control 
  4904. Range       Set the maximum length of a single line edit control 
  4905. Text        Get/Set a single line edit control's text content 
  4906. Style       Get/Set a single line edit control's style mask 
  4907. Font        Get/Set a single line edit control's text font 
  4908. Color       Get/Set a single line edit control attribute's color 
  4909. ID          Get a single line edit control's window ID 
  4910. Position    Get/Set a single line edit control's position and size 
  4911. Hide        Hide a single line edit control 
  4912. Show        Show a single line edit control 
  4913. Visible     Get/Set a single line edit control's visibility state 
  4914. Top         Make a single line edit control the topmost control 
  4915. Bottom      Make a single line edit control the bottommost control 
  4916. Enable      Enable a single line edit control 
  4917. Disable     Disable a single line edit control 
  4918. Enabled     Get/Set a single line edit control's enabled state 
  4919. Focus       Give a single line edit control the input focus 
  4920. Drag        Enable/Disable dragging a single line edit control 
  4921. Drop        Enable/Disable dropping on a single line edit control 
  4922. IsDefault   Make a single line edit control the current default control 
  4923. Controls    Get a list of all dialog controls 
  4924. Classes     Get a list of all dialog control classes 
  4925.  
  4926.  
  4927. ΓòÉΓòÉΓòÉ 10.10. Multi-line edit control ΓòÉΓòÉΓòÉ
  4928.  
  4929. Creates a multi-line edit control. 
  4930.  
  4931. The events defined for a multi-line edit control are: 
  4932.  
  4933. Event       Description 
  4934. Changed     The edit control contents have changed 
  4935. Init        The edit control is being initialized when the dialog is opened 
  4936. GetFocus    The edit control has been given the input focus 
  4937. LoseFocus   The edit control has lost the input focus 
  4938. Drop        An object has been dropped on the edit control. Refer to the Drop 
  4939.             event section for details about the information that can be 
  4940.             retrieved for the event using the EventData function. 
  4941.  
  4942. The DrRexx window functions that can be applied to a multi-line edit control 
  4943. are: 
  4944.  
  4945. Text        Get/Set a multi-line edit control's text content 
  4946. Style       Get/Set a multi-line edit control's style mask 
  4947. Font        Get/Set a multi-line edit control's text font 
  4948. Color       Get/Set a multi-line edit control attribute's color 
  4949. ID          Get a multi-line edit control's window ID 
  4950. Position    Get/Set a multi-line edit control's position and size 
  4951. Hide        Hide a multi-line edit control 
  4952. Show        Show a multi-line edit control 
  4953. Visible     Get/Set a multi-line edit control's visibility state 
  4954. Top         Make a multi-line edit control the topmost control 
  4955. Bottom      Make a multi-line edit control the bottommost control 
  4956. Enable      Enable a multi-line edit control 
  4957. Disable     Disable a multi-line edit control 
  4958. Enabled     Get/Set a multi-line edit control's enabled state 
  4959. Focus       Give a multi-line edit control the input focus 
  4960. Drag        Enable/Disable dragging a multi-line edit control 
  4961. Drop        Enable/Disable dropping on a multi-line edit control 
  4962. IsDefault   Make a multi-line edit control the current default control 
  4963. Controls    Get a list of all dialog controls 
  4964. Classes     Get a list of all dialog control classes 
  4965.  
  4966.  
  4967. ΓòÉΓòÉΓòÉ 10.11. Combo box control ΓòÉΓòÉΓòÉ
  4968.  
  4969. Creates a prompted entry field control (i.e. combo box). 
  4970.  
  4971. The events defined for a combo box control are: 
  4972.  
  4973. Event       Description 
  4974. Enter       The user has pressed Enter or double-clicked on a combo box entry 
  4975. Select      The user has selected a combo box entry 
  4976. Init        The combo box control is being initialized when the dialog is 
  4977.             opened 
  4978. Changed     The entry field component contents have been changed 
  4979. ScrollEntry The entry field component has scrolled horizontally 
  4980. ScrollList  The list box component has been scrolled 
  4981. ShowList    The list box component has been displayed (i.e. has dropped down) 
  4982. Drop        An object has been dropped on the combo box. Refer to the Drop 
  4983.             event section for details about the information that can be 
  4984.             retrieved for the event using the EventData function. 
  4985.  
  4986. The DrRexx window functions that can be applied to a combo box control are: 
  4987.  
  4988. Add         Add a new combo box item 
  4989. Delete      Delete one or all combo box items 
  4990. Select      Get/Set the select state of a combo box item 
  4991. Item        Get/Set a combo box item's value 
  4992. Style       Get/Set a combo box control's style mask 
  4993. Font        Get/Set a combo box control's text font 
  4994. Color       Get/Set a combo box control attribute's color 
  4995. ID          Get a combo box control's window ID 
  4996. Position    Get/Set a combo box control's position and size 
  4997. Hide        Hide a combo box control 
  4998. Show        Show a combo box control 
  4999. Visible     Get/Set a combo box control's visibility state 
  5000. Top         Make a combo box the topmost control 
  5001. Bottom      Make a combo box the bottommost control 
  5002. Enable      Enable a combo box control 
  5003. Disable     Disable a combo box control 
  5004. Enabled     Get/Set a combo box control's enabled state 
  5005. Focus       Give a combo box control the input focus 
  5006. Drag        Enable/Disable dragging a combo box control 
  5007. Drop        Enable/Disable dropping on a combo box control 
  5008. IsDefault   Make a combo box control the current default control 
  5009. Controls    Get a list of all dialog controls 
  5010. Classes     Get a list of all dialog control classes 
  5011.  
  5012.  
  5013. ΓòÉΓòÉΓòÉ 10.12. Spin button control ΓòÉΓòÉΓòÉ
  5014.  
  5015. Creates a spin button control. 
  5016.  
  5017. The events defined for a spin button control are: 
  5018.  
  5019. Event       Description 
  5020. Changing    The spin field contents have changed 
  5021. LineUp      The up arrow has been pressed or clicked 
  5022. LineDown    The down arrow has been pressed or clicked 
  5023. GetFocus    The spin button control has been given the input focus 
  5024. LoseFocus   The spin button control has lost the input focus 
  5025. Drop        An object has been dropped on the spin button. Refer to the Drop 
  5026.             event section for details about the information that can be 
  5027.             retrieved for the event using the EventData function. 
  5028. Done        The user has released the select button or one of the arrow buttons 
  5029. Init        The spin button control is being initialized when the dialog is 
  5030.             opened 
  5031.  
  5032. The DrRexx window functions that can be applied to a spin button control are: 
  5033.  
  5034. Select      Get/Set the current spin button item 
  5035. Range       Set the range of spin button items 
  5036. Style       Get/Set a spin button control's style mask 
  5037. Font        Get/Set a spin button control's text font 
  5038. Color       Get/Set a spin button control attribute's color 
  5039. ID          Get a spin button control's window ID 
  5040. Position    Get/Set a spin button control's position and size 
  5041. Hide        Hide a spin button control 
  5042. Show        Show a spin button control 
  5043. Visible     Get/Set a spin button control's visibility state 
  5044. Top         Make a spin button the topmost control 
  5045. Bottom      Make a spin button the bottommost control 
  5046. Enable      Enable a spin button control 
  5047. Disable     Disable a spin button control 
  5048. Enabled     Get/Set a spin button control's enabled state 
  5049. Focus       Give a spin button control the input focus 
  5050. Drag        Enable/Disable dragging a spin button control 
  5051. Drop        Enable/Disable dropping on a spin button control 
  5052. IsDefault   Make a spin button control the current default control 
  5053. Controls    Get a list of all dialog controls 
  5054. Classes     Get a list of all dialog control classes 
  5055.  
  5056.  
  5057. ΓòÉΓòÉΓòÉ 10.13. Value set control ΓòÉΓòÉΓòÉ
  5058.  
  5059. Creates a value set control. 
  5060.  
  5061. The events defined for a value set control are: 
  5062.  
  5063. Event       Description 
  5064. Enter       The user has pressed Enter or double-clicked on a value set item 
  5065. Select      The user has selected a value set item 
  5066. Init        The value set control is being initialized when the dialog is 
  5067.             opened 
  5068. GetFocus    The value set control has been given the input focus 
  5069. LoseFocus   The value set control has lost the input focus 
  5070. Drop        An object has been dropped on the value set control. Refer to the 
  5071.             Drop event section for details about the information that can be 
  5072.             retrieved for the event using the EventData function. 
  5073.  
  5074. The DrRexx window functions that can be applied to a value set control are: 
  5075.  
  5076. Select      Get/Set the currently selected value set item 
  5077. Item        Get/Set the value of a value set item 
  5078. Style       Get/Set a value set control's style mask 
  5079. Font        Get/Set a value set control's text font 
  5080. Color       Get/Set a value set control attribute's color 
  5081. ID          Get a value set control's window ID 
  5082. Position    Get/Set a value set control's position and size 
  5083. Hide        Hide a value set control 
  5084. Show        Show a value set control 
  5085. Visible     Get/Set a value set control's visibility state 
  5086. Top         Make a value set the topmost control 
  5087. Bottom      Make a value set the bottommost control 
  5088. Enable      Enable a value set control 
  5089. Disable     Disable a value set control 
  5090. Enabled     Get/Set a value set control's enabled state 
  5091. Focus       Give a value set control the input focus 
  5092. Drag        Enable/Disable dragging a value set control 
  5093. Drop        Enable/Disable dropping on a value set control 
  5094. IsDefault   Make a value set control the current default control 
  5095. Controls    Get a list of all dialog controls 
  5096. Classes     Get a list of all dialog control classes 
  5097.  
  5098.  
  5099. ΓòÉΓòÉΓòÉ 10.14. Vertical scroll bar control ΓòÉΓòÉΓòÉ
  5100.  
  5101. Creates a vertical scroll bar. 
  5102.  
  5103. The events defined for a vertical scroll bar control are: 
  5104.  
  5105. Event       Description 
  5106. Init        The scroll bar control is being initialized when the dialog is 
  5107.             opened 
  5108. Changed     The user has released the scroll bar slider 
  5109. Changing    The user has moved the scroll bar slider 
  5110. LineUp      The user has clicked on the scroll bar up arrow 
  5111. LineDown    The user has clicked on the scroll bar down arrow 
  5112. PageUp      The user has clicked on the area above the scroll bar slider 
  5113. PageDown    The user has clicked on the area below the scroll bar slider 
  5114. Done        The user has finished scrolling (but not using the scroll bar 
  5115.             slider) 
  5116. Drop        An object has been dropped on the scroll bar control. Refer to the 
  5117.             Drop event section for details about the information that can be 
  5118.             retrieved for the event using the EventData function. 
  5119.  
  5120. The DrRexx window functions that can be applied to a vertical scroll bar 
  5121. control are: 
  5122.  
  5123. Range       Set the range for a vertical scroll bar control 
  5124. Select      Get/Set the current vertical scroll bar control position 
  5125. Style       Get/Set a vertical scroll bar control's style mask 
  5126. Color       Get/Set a vertical scroll bar control attribute's color 
  5127. ID          Get a vertical scroll bar control's window ID 
  5128. Position    Get/Set a vertical scroll bar control's position and size 
  5129. Hide        Hide a vertical scroll bar control 
  5130. Show        Show a vertical scroll bar control 
  5131. Visible     Get/Set a vertical scroll bar control's visibility state 
  5132. Top         Make a vertical scroll bar the topmost control 
  5133. Bottom      Make a vertical scroll bar the bottommost control 
  5134. Enable      Enable a vertical scroll bar control 
  5135. Disable     Disable a vertical scroll bar control 
  5136. Enabled     Get/Set a vertical scroll bar control's enabled state 
  5137. Focus       Give a vertical scroll bar control the input focus 
  5138. Drag        Enable/Disable dragging a vertical scroll bar control 
  5139. Drop        Enable/Disable dropping on a vertical scroll bar control 
  5140. IsDefault   Make a vertical scroll bar control the current default control 
  5141. Controls    Get a list of all dialog controls 
  5142. Classes     Get a list of all dialog control classes 
  5143.  
  5144.  
  5145. ΓòÉΓòÉΓòÉ 10.15. Horizontal scroll bar control ΓòÉΓòÉΓòÉ
  5146.  
  5147. Creates a horizontal scroll bar. 
  5148.  
  5149. The events defined for a horizontal scroll bar control are: 
  5150.  
  5151. Event       Description 
  5152. Init        The scroll bar control is being initialized when the dialog is 
  5153.             opened 
  5154. Changed     The user has released the scroll bar slider 
  5155. Changing    The user has moved the scroll bar slider 
  5156. LineLeft    The user has clicked on the scroll bar left arrow 
  5157. LineRight   The user has clicked on the scroll bar right arrow 
  5158. PageLeft    The user has clicked on the area to the left of the scroll bar 
  5159.             slider 
  5160. PageRight   The user has clicked on the area to the right of the scroll bar 
  5161.             slider 
  5162. Done        The user has finished scrolling (but not using the scroll bar 
  5163.             slider) 
  5164. Drop        An object has been dropped on the scroll bar control. Refer to the 
  5165.             Drop event section for details about the information that can be 
  5166.             retrieved for the event using the EventData function. 
  5167.  
  5168. The DrRexx window functions that can be applied to a horizontal scroll bar 
  5169. control are: 
  5170.  
  5171. Range       Set the range for a horizontal scroll bar control 
  5172. Select      Get/Set the current horizontal scroll bar control position 
  5173. Style       Get/Set a horizontal scroll bar control's style mask 
  5174. Color       Get/Set a horizontal scroll bar control attribute's color 
  5175. ID          Get a horizontal scroll bar control's window ID 
  5176. Position    Get/Set a horizontal scroll bar control's position and size 
  5177. Hide        Hide a horizontal scroll bar control 
  5178. Show        Show a horizontal scroll bar control 
  5179. Visible     Get/Set a horizontal scroll bar control's visibility state 
  5180. Top         Make a horizontal scroll bar the topmost control 
  5181. Bottom      Make a horizontal scroll bar the bottommost control 
  5182. Enable      Enable a horizontal scroll bar control 
  5183. Disable     Disable a horizontal scroll bar control 
  5184. Enabled     Get/Set a horizontal scroll bar control's enabled state 
  5185. Focus       Give a horizontal scroll bar control the input focus 
  5186. Drag        Enable/Disable dragging a horizontal scroll bar control 
  5187. Drop        Enable/Disable dropping on a horizontal scroll bar control 
  5188. IsDefault   Make a horizontal scroll bar control the current default control 
  5189. Controls    Get a list of all dialog controls 
  5190. Classes     Get a list of all dialog control classes 
  5191.  
  5192.  
  5193. ΓòÉΓòÉΓòÉ 10.16. Slider control ΓòÉΓòÉΓòÉ
  5194.  
  5195. Creates a slider control. 
  5196.  
  5197. The events defined for a slider control are: 
  5198.  
  5199. Event       Description 
  5200. Init        The slider control is being initialized when the dialog is opened 
  5201. Changed     The slider arm has been released 
  5202. Changing    The slider arm position has changed 
  5203. GetFocus    The slider control has been given the input focus 
  5204. LoseFocus   The slider control has lost the input focus 
  5205. Drop        An object has been dropped on the slider control. Refer to the Drop 
  5206.             event section for details about the information that can be 
  5207.             retrieved for the event using the EventData function. 
  5208.  
  5209. The DrRexx window functions that can be applied to a slider control are: 
  5210.  
  5211. Item        Get/Set a slider control tick label or size 
  5212. Select      Get/Set a slider control's slider position 
  5213. Range       Sets the slider control's range of tick values 
  5214. Style       Get/Set a slider control style mask 
  5215. Font        Get/Set a slider control label font 
  5216. Color       Get/Set a slider control attribute's color 
  5217. ID          Get a slider control window ID 
  5218. Position    Get/Set a slider control's position and size 
  5219. Hide        Hide a slider control 
  5220. Show        Show a slider control 
  5221. Visible     Get/Set a slider control's visibility state 
  5222. Top         Make a slider the topmost control 
  5223. Bottom      Make a slider the bottommost control 
  5224. Enable      Enable a slider control 
  5225. Disable     Disable a slider control 
  5226. Enabled     Get/Set a slider control's enabled state 
  5227. Focus       Give a slider control the input focus 
  5228. Drag        Enable/Disable dragging a slider control 
  5229. Drop        Enable/Disable dropping on a slider control 
  5230. IsDefault   Make a slider control the current default control 
  5231. Controls    Get a list of all dialog controls 
  5232. Classes     Get a list of all dialog control classes 
  5233.  
  5234.  
  5235. ΓòÉΓòÉΓòÉ 10.17. Group box control ΓòÉΓòÉΓòÉ
  5236.  
  5237. Creates a group box control. 
  5238.  
  5239. Note:  This a DrDialog container control. 
  5240.  
  5241. The events defined for a group box control are: 
  5242.  
  5243. Event       Description 
  5244. Init        The group box is being initialized when the dialog is opened 
  5245. Drop        An object has been dropped on the group box. Refer to the Drop 
  5246.             event section for details about the information that can be 
  5247.             retrieved for the event using the EventData function. 
  5248.  
  5249. The DrRexx window functions that can be applied to a group box control are: 
  5250.  
  5251. Text        Get/Set a group box control title text 
  5252. Style       Get/Set a group box control style mask 
  5253. Font        Get/Set a group box control label font 
  5254. Color       Get/Set a group box control attribute's color 
  5255. ID          Get a group box control window ID 
  5256. Position    Get/Set a group box control's position and size 
  5257. Hide        Hide a group box control 
  5258. Show        Show a group box control 
  5259. Visible     Get/Set a group box control's visibility state 
  5260. Top         Make a group box the topmost control 
  5261. Bottom      Make a group box the bottommost control 
  5262. Enable      Enable a group box control 
  5263. Disable     Disable a group box control 
  5264. Enabled     Get/Set a group box control's enabled state 
  5265. Focus       Give a group box control the input focus 
  5266. Drag        Enable/Disable dragging a group box control 
  5267. Drop        Enable/Disable dropping on a group box control 
  5268. IsDefault   Make a group box control the current default control 
  5269. Controls    Get a list of all dialog controls 
  5270. Classes     Get a list of all dialog control classes 
  5271.  
  5272.  
  5273. ΓòÉΓòÉΓòÉ 10.18. Frame control ΓòÉΓòÉΓòÉ
  5274.  
  5275. Creates a frame control. 
  5276.  
  5277. Note:  This a DrDialog container control. 
  5278.  
  5279. The events defined for a frame control are: 
  5280.  
  5281. Event       Description 
  5282. Init        The frame control is being initialized when the dialog is opened 
  5283. Drop        An object has been dropped on the frame control. Refer to the Drop 
  5284.             event section for details about the information that can be 
  5285.             retrieved for the event using the EventData function. 
  5286.  
  5287. The DrRexx window functions that can be applied to a frame control are: 
  5288.  
  5289. Style       Get/Set a frame control style mask 
  5290. Color       Get/Set a frame control attribute's color 
  5291. ID          Get a frame control window ID 
  5292. Position    Get/Set a frame control's position and size 
  5293. Hide        Hide a frame control 
  5294. Show        Show a frame control 
  5295. Visible     Get/Set a frame control's visibility state 
  5296. Top         Make a frame control the topmost control 
  5297. Bottom      Make a frame control the bottommost control 
  5298. Drag        Enable/Disable dragging a frame control 
  5299. Drop        Enable/Disable dropping on a frame control 
  5300. IsDefault   Make a frame control the current default control 
  5301. Controls    Get a list of all dialog controls 
  5302. Classes     Get a list of all dialog control classes 
  5303.  
  5304.  
  5305. ΓòÉΓòÉΓòÉ 10.19. Rectangle control ΓòÉΓòÉΓòÉ
  5306.  
  5307. Creates a rectangle control. 
  5308.  
  5309. Note:  This a DrDialog container control. 
  5310.  
  5311. The events defined for a rectangle control are: 
  5312.  
  5313. Event       Description 
  5314. Init        The rectangle control is being initialized when the dialog is 
  5315.             opened 
  5316. Drop        An object has been dropped on the rectangle control. Refer to the 
  5317.             Drop event section for details about the information that can be 
  5318.             retrieved for the event using the EventData function. 
  5319.  
  5320. The DrRexx window functions that can be applied to a rectangle control are: 
  5321.  
  5322. Style       Get/Set a rectangle control style mask 
  5323. Color       Get/Set a rectangle control attribute's color 
  5324. ID          Get a rectangle control window ID 
  5325. Position    Get/Set a rectangle control's position and size 
  5326. Hide        Hide a rectangle control 
  5327. Show        Show a rectangle control 
  5328. Visible     Get/Set a rectangle control's visibility state 
  5329. Top         Make a rectangle control the topmost control 
  5330. Bottom      Make a rectangle control the bottommost control 
  5331. Drag        Enable/Disable dragging a rectangle control 
  5332. Drop        Enable/Disable dropping on a rectangle control 
  5333. IsDefault   Make a rectangle control the current default control 
  5334. Controls    Get a list of all dialog controls 
  5335. Classes     Get a list of all dialog control classes 
  5336.  
  5337.  
  5338. ΓòÉΓòÉΓòÉ 10.20. Billboard control ΓòÉΓòÉΓòÉ
  5339.  
  5340. Creates a billboard control. 
  5341.  
  5342. Note:  This control is not a standard OS/2 control. 
  5343.  
  5344. The events defined for a billboard control are: 
  5345.  
  5346. Event       Description 
  5347. Init        The billboard control is being initialized when the dialog is 
  5348.             opened 
  5349. Drop        An object has been dropped on the billboard control. Refer to the 
  5350.             Drop event section for details about the information that can be 
  5351.             retrieved for the event using the EventData function. 
  5352.  
  5353. The DrRexx window functions that can be applied to a billboard control are: 
  5354.  
  5355. Style       Get/Set a billboard control style mask 
  5356. ID          Get a billboard control window ID 
  5357. Position    Get/Set a billboard control's position and size 
  5358. Hide        Hide a billboard control 
  5359. Show        Show a billboard control 
  5360. Visible     Get/Set a billboard control's visibility state 
  5361. Top         Make a billboard the topmost control 
  5362. Bottom      Make a billboard the bottommost control 
  5363. Drag        Enable/Disable dragging a billboard control 
  5364. Drop        Enable/Disable dropping on a billboard control 
  5365. IsDefault   Make a billboard control the current default control 
  5366. Controls    Get a list of all dialog controls 
  5367. Classes     Get a list of all dialog control classes 
  5368.  
  5369.  
  5370. ΓòÉΓòÉΓòÉ 10.21. Canvas control ΓòÉΓòÉΓòÉ
  5371.  
  5372. Creates a canvas control. 
  5373.  
  5374. Note:  This a DrDialog container control. 
  5375.  
  5376. Note:  This control is not a standard OS/2 control. 
  5377.  
  5378. The events defined for a canvas control are: 
  5379.  
  5380. Event       Description 
  5381. Init        The canvas control is being initialized when the dialog is opened 
  5382. Drop        An object has been dropped on the canvas control. Refer to the Drop 
  5383.             event section for details about the information that can be 
  5384.             retrieved for the event using the EventData function. 
  5385.  
  5386. The DrRexx window functions that can be applied to a canvas control are: 
  5387.  
  5388. Style       Get/Set a canvas control style mask 
  5389. Font        Get/Set a canvas control label font 
  5390. ID          Get a canvas control window ID 
  5391. Position    Get/Set a canvas control's position and size 
  5392. Hide        Hide a canvas control 
  5393. Show        Show a canvas control 
  5394. Visible     Get/Set a canvas control's visibility state 
  5395. Top         Make a canvas control the topmost control 
  5396. Bottom      Make a canvas control the bottommost control 
  5397. Drag        Enable/Disable dragging a canvas control 
  5398. Drop        Enable/Disable dropping on a canvas control 
  5399. IsDefault   Make a canvas control the current default control 
  5400. Controls    Get a list of all dialog controls 
  5401. Classes     Get a list of all dialog control classes 
  5402.  
  5403.  
  5404. ΓòÉΓòÉΓòÉ 10.22. Paint control ΓòÉΓòÉΓòÉ
  5405.  
  5406. Creates a paint control. 
  5407.  
  5408. Note:  This a DrDialog container control. 
  5409.  
  5410. Note:  This control is not a standard OS/2 control. 
  5411.  
  5412. The events defined for a paint control are: 
  5413.  
  5414. Event       Description 
  5415. Init        The paint control is being initialized when the dialog is opened 
  5416. Drop        An object has been dropped on the paint control. Refer to the Drop 
  5417.             event section for details about the information that can be 
  5418.             retrieved for the event using the EventData function. 
  5419.  
  5420. The DrRexx window functions that can be applied to a paint control are: 
  5421.  
  5422. Style       Get/Set a paint control style mask 
  5423. ID          Get a paint control window ID 
  5424. Position    Get/Set a paint control's position and size 
  5425. Hide        Hide a paint control 
  5426. Show        Show a paint control 
  5427. Visible     Get/Set a paint control's visibility state 
  5428. Top         Make a paint control the topmost control 
  5429. Bottom      Make a paint control the bottommost control 
  5430. Drag        Enable/Disable dragging a paint control 
  5431. Drop        Enable/Disable dropping on a paint control 
  5432. IsDefault   Make a paint control the current default control 
  5433. Controls    Get a list of all dialog controls 
  5434. Classes     Get a list of all dialog control classes 
  5435.  
  5436.  
  5437. ΓòÉΓòÉΓòÉ 10.23. Bitmap button control ΓòÉΓòÉΓòÉ
  5438.  
  5439. Creates a bitmap button control. 
  5440.  
  5441. Note:  This control is not a standard OS/2 control. 
  5442.  
  5443. The events defined for a bitmap button control are: 
  5444.  
  5445. Event       Description 
  5446. Click       The user has clicked the bitmap button 
  5447. Init        The bitmap button is being initialized when the dialog is opened 
  5448. Drop        An object has been dropped on the bitmap button. Refer to the Drop 
  5449.             event section for details about the information that can be 
  5450.             retrieved for the event using the EventData function. 
  5451.  
  5452. The DrRexx window functions that can be applied to a bitmap button control are: 
  5453.  
  5454. Text        Get/Set a bitmap button control icon 
  5455. Style       Get/Set a bitmap button control style mask 
  5456. ID          Get a bitmap button control window ID 
  5457. Position    Get/Set a bitmap button control's position and size 
  5458. Hide        Hide a bitmap button control 
  5459. Show        Show a bitmap button control 
  5460. Visible     Get/Set a bitmap button control's visibility state 
  5461. Top         Make a bitmap button the topmost control 
  5462. Bottom      Make a bitmap button the bottommost control 
  5463. Enable      Enable a bitmap button control 
  5464. Disable     Disable a bitmap button control 
  5465. Enabled     Get/Set a bitmap button control's enabled state 
  5466. Focus       Give a bitmap button control the input focus 
  5467. Drag        Enable/Disable dragging a bitmap button control 
  5468. Drop        Enable/Disable dropping on a bitmap button control 
  5469. IsDefault   Make a bitmap button control the current default control 
  5470. Controls    Get a list of all dialog controls 
  5471. Classes     Get a list of all dialog control classes 
  5472.  
  5473.  
  5474. ΓòÉΓòÉΓòÉ 10.24. Bagbutton control ΓòÉΓòÉΓòÉ
  5475.  
  5476. Creates a bagbutton control. 
  5477.  
  5478. Note:  This control is not a standard OS/2 control. 
  5479.  
  5480. The events defined for a bagbutton control are: 
  5481.  
  5482. Event       Description 
  5483. Click       The user has clicked the bagbutton 
  5484. Init        The bagbutton is being initialized when the dialog is opened 
  5485. Drop        An object has been dropped on the bagbutton. Refer to the Drop 
  5486.             event section for details about the information that can be 
  5487.             retrieved for the event using the EventData function. 
  5488.  
  5489. The DrRexx window functions that can be applied to a bagbutton control are: 
  5490.  
  5491. Select      Get/Set a state of the bagbutton control 
  5492. Text        Get/Set a bagbutton control label text 
  5493. Style       Get/Set a bagbutton control style mask 
  5494. Font        Get/Set a bagbutton control label font 
  5495. ID          Get a bagbutton control window ID 
  5496. Position    Get/Set a bagbutton control's position and size 
  5497. Hide        Hide a bagbutton control 
  5498. Show        Show a bagbutton control 
  5499. Visible     Get/Set a bagbutton control's visibility state 
  5500. Top         Make a bagbutton the topmost control 
  5501. Bottom      Make a bagbutton the bottommost control 
  5502. Enable      Enable a bagbutton control 
  5503. Disable     Disable a bagbutton control 
  5504. Enabled     Get/Set a bagbutton control's enabled state 
  5505. Focus       Give a bagbutton control the input focus 
  5506. Drag        Enable/Disable dragging a bagbutton control 
  5507. Drop        Enable/Disable dropping on a bagbutton control 
  5508. IsDefault   Make a bagbutton control the current default control 
  5509. Controls    Get a list of all dialog controls 
  5510. Classes     Get a list of all dialog control classes 
  5511.  
  5512.  
  5513. ΓòÉΓòÉΓòÉ 10.25. Turtle control ΓòÉΓòÉΓòÉ
  5514.  
  5515. Creates a turtle control. 
  5516.  
  5517. Note:  This control is not a standard OS/2 control. 
  5518.  
  5519. The events defined for a turtle control are: 
  5520.  
  5521. Event           Description 
  5522. Init            The turtle control is being initialized when the dialog is 
  5523.                 opened 
  5524. MouseMove       The mouse has moved over the turtle control (see note below) 
  5525. Button1Down     The user has pressed button 1 over the turtle control (see note 
  5526.                 below) 
  5527. Button1Up       The user has released button 1 (see note below) 
  5528. Button1DblClk   The user has double-clicked button 1 over the turtle control 
  5529.                 (see note below) 
  5530. Button2Down     The user has pressed button 2 over the turtle control (see note 
  5531.                 below) 
  5532. Button2Up       The user has released button 2 (see note below) 
  5533. Button2DblClk   The user has double-clicked button 2 over the turtle control 
  5534.                 (see note below) 
  5535. Drop            An object has been dropped on the turtle control. Refer to the 
  5536.                 Drop event section for details about the information that can 
  5537.                 be retrieved for the event using the EventData function. 
  5538.  
  5539. Note:  The mouse events will only be generated if the Container style is not 
  5540. checked in the style dialog for the turtle control. In addition, the EventData 
  5541. function can retrieve the following information about the event: 
  5542.  
  5543. EventData.1 x position of the pointer within the turtle control 
  5544. EventData.2 y position of the pointer within the turtle control 
  5545.  
  5546. The DrRexx window functions that can be applied to a turtle control are: 
  5547.  
  5548. Text        Get/Set a turtle control's command text 
  5549. Style       Get/Set a turtle control's style mask 
  5550. ID          Get a turtle control's window ID 
  5551. Position    Get/Set a turtle control's position and size 
  5552. Hide        Hide a turtle control 
  5553. Show        Show a turtle control 
  5554. Visible     Get/Set a turtle control's visibility state 
  5555. Top         Make a turtle control the topmost control 
  5556. Bottom      Make a turtle control the bottommost control 
  5557. Drag        Enable/Disable dragging a turtle control 
  5558. Drop        Enable/Disable dropping on a turtle control 
  5559. IsDefault   Make a turtle control the current default control 
  5560. Controls    Get a list of all dialog controls 
  5561. Classes     Get a list of all dialog control classes 
  5562.  
  5563.  
  5564. ΓòÉΓòÉΓòÉ 10.26. Bitmap control ΓòÉΓòÉΓòÉ
  5565.  
  5566. Creates a bitmap control. 
  5567.  
  5568. The events defined for a bitmap control are: 
  5569.  
  5570. Event       Description 
  5571. Init        The bitmap control is being initialized when the dialog is opened 
  5572. Drop        An object has been dropped on the bitmap control. Refer to the Drop 
  5573.             event section for details about the information that can be 
  5574.             retrieved for the event using the EventData function. 
  5575.  
  5576. The DrRexx window functions that can be applied to a bitmap control are: 
  5577.  
  5578. Style       Get/Set a bitmap control style mask 
  5579. Color       Get/Set a bitmap control attribute's color 
  5580. ID          Get a bitmap control window ID 
  5581. Position    Get/Set a bitmap control's position and size 
  5582. Hide        Hide a bitmap control 
  5583. Show        Show a bitmap control 
  5584. Visible     Get/Set a bitmap control's visibility state 
  5585. Top         Make a bitmap control the topmost control 
  5586. Bottom      Make a bitmap control the bottommost control 
  5587. Enable      Enable a bitmap control 
  5588. Disable     Disable a bitmap control 
  5589. Enabled     Get/Set a bitmap control's enabled state 
  5590. Focus       Give a bitmap control the input focus 
  5591. Drag        Enable/Disable dragging a bitmap control 
  5592. Drop        Enable/Disable dropping on a bitmap control 
  5593. IsDefault   Make a bitmap control the current default control 
  5594. Controls    Get a list of all dialog controls 
  5595. Classes     Get a list of all dialog control classes 
  5596.  
  5597.  
  5598. ΓòÉΓòÉΓòÉ 10.27. User defined control ΓòÉΓòÉΓòÉ
  5599.  
  5600. Creates a user defined control. 
  5601.  
  5602. Note:  The actual window class of the control can be specified by editing the 
  5603. control's style. 
  5604.  
  5605. The events defined for a user defined control are: 
  5606.  
  5607. Event       Description 
  5608. Init        The user defined control is being initialized when the dialog is 
  5609.             opened 
  5610. Drop        An object has been dropped on the user defined control. Refer to 
  5611.             the Drop event section for details about the information that can 
  5612.             be retrieved for the event using the EventData function. 
  5613.  
  5614. The DrRexx window functions that can be applied to a user defined control are: 
  5615.  
  5616. Text        Get/Set a user defined control's text 
  5617. Style       Get/Set a user defined control style mask 
  5618. Color       Get/Set a user defined control attribute's color 
  5619. ID          Get a user defined control window ID 
  5620. Position    Get/Set a user defined control's position and size 
  5621. Hide        Hide a user defined control 
  5622. Show        Show a user defined control 
  5623. Visible     Get/Set a user defined control's visibility state 
  5624. Top         Make a user defined control the topmost control 
  5625. Bottom      Make a user defined control the bottommost control 
  5626. Enable      Enable a user defined control 
  5627. Disable     Disable a user defined control 
  5628. Enabled     Get/Set a user defined control's enabled state 
  5629. Focus       Give a user defined control the input focus 
  5630. Drag        Enable/Disable dragging a user defined control 
  5631. Drop        Enable/Disable dropping on a user defined control 
  5632. IsDefault   Make a user defined control the current default control 
  5633. Controls    Get a list of all dialog controls 
  5634. Classes     Get a list of all dialog control classes 
  5635.  
  5636.  
  5637. ΓòÉΓòÉΓòÉ 10.28. Marquee control ΓòÉΓòÉΓòÉ
  5638.  
  5639. Creates a marquee control. 
  5640.  
  5641. Note:  This control is not a standard OS/2 control. 
  5642.  
  5643. The events defined for a marquee control are: 
  5644.  
  5645. Event       Description 
  5646. Init        The marquee control is being initialized when the dialog is opened 
  5647. Drop        An object has been dropped on the marquee control. Refer to the 
  5648.             Drop event section for details about the information that can be 
  5649.             retrieved for the event using the EventData function. 
  5650.  
  5651. The DrRexx window functions that can be applied to a marquee control are: 
  5652.  
  5653. Text        Get/Set a marquee control's text 
  5654. Style       Get/Set a marquee control style mask 
  5655. ID          Get a marquee control window ID 
  5656. Position    Get/Set a marquee control's position and size 
  5657. Hide        Hide a marquee control 
  5658. Show        Show a marquee control 
  5659. Visible     Get/Set a marquee control's visibility state 
  5660. Top         Make a marquee control the topmost control 
  5661. Bottom      Make a marquee control the bottommost control 
  5662. Drag        Enable/Disable dragging a marquee control 
  5663. Drop        Enable/Disable dropping on a marquee control 
  5664. IsDefault   Make a marquee control the current default control 
  5665. Controls    Get a list of all dialog controls 
  5666. Classes     Get a list of all dialog control classes 
  5667.  
  5668.  
  5669. ΓòÉΓòÉΓòÉ <hidden> Drop event ΓòÉΓòÉΓòÉ
  5670.  
  5671. When a source object is dropped on a drop enabled DrRexx control, it generates 
  5672. one or more Drop events for the dropped on, or target, control. A Rexx event or 
  5673. class handler can be written to handle these events and take appropriate 
  5674. action. In order to determine what the appropriate action is, the EventData 
  5675. function can be used to retrieve the following information about the source 
  5676. object: 
  5677.  
  5678. EventData.1   The data supplied by the source object. 
  5679. EventData.2   The source object container. 
  5680. EventData.3   The type of the source object data. 
  5681. EventData.4   The format of the source object data (i.e. STRING or FILE). 
  5682. EventData.5   The operation to be performed on the source object data (i.e. 
  5683.               MOVE, COPY or LINK). 
  5684. EventData.6   The source object ID. 
  5685. EventData.7   The target object ID. 
  5686. EventData.8   The location where the source object was dropped. 
  5687.  
  5688. For some of these items, the form the value takes depends on the type of the 
  5689. source object as follows: 
  5690.  
  5691. EventData.1   If the format of the source object is STRING, the data can be any 
  5692.               valid REXX string. If the format is FILE, the data should be the 
  5693.               fully qualified name of an OS/2 file (e.g. 
  5694.               C:\OS2\BITMAP\OS2LOGO.BMP). 
  5695.  
  5696. EventData.2   The source object container depends both on the format and source 
  5697.               of the dropped object. If the format is FILE, then the container 
  5698.               is the path name of the OS/2 file being dropped (e.g. 
  5699.               C:\OS2\BITMAP\). If the format is STRING and the originator is 
  5700.               another DrRexx control (not necessarily in the same application), 
  5701.               the container is a string of the form: dialog.control=class, 
  5702.               where dialog is the name of the DrRexx dialog containing the 
  5703.               control that was dragged, control is the name of the control, and 
  5704.               class is the class of the control (e.g. 
  5705.               orders.customers=CONTAINER). In the case of a non-DrRexx source 
  5706.               object of format STRING, the form of the container field is not 
  5707.               specified. 
  5708.  
  5709. EventData.3   The type of the source object data is the intersection of the 
  5710.               source and target types (i.e. source types not understood by the 
  5711.               target are not included in the value). If the target accepts ANY 
  5712.               type, then all of the source object types are included in the 
  5713.               value. 
  5714.  
  5715. EventData.4   The format of the source object data will either be STRING or 
  5716.               FILE. 
  5717.  
  5718. EventData.5   The operation to be performed on the source object data will 
  5719.               either be MOVE, COPY or LINK. 
  5720.  
  5721. EventData.6   The source object ID gives more information about which part of 
  5722.               the source object was dragged. Since most DrRexx controls only 
  5723.               have a single part, this value is normally just the source 
  5724.               control ID (e.g. 101). The exceptions are: 
  5725.  
  5726.    Container   The source ID is the container item that was dragged. 
  5727.  
  5728.    Value set   The source ID is the value set item that was dragged. This is a 
  5729.                single number of the form: row + 65536 * column. 
  5730.  
  5731.    List box    The source ID is the number of the list box item that was 
  5732.                dragged. 
  5733.  
  5734.               Note:  In the case where the source object is not a DrRexx 
  5735.               control, the meaning of the source ID is not defined, other than 
  5736.               that it is a number. 
  5737.  
  5738. EventData.7   The target object ID gives more information about which part of 
  5739.               the target control the source object was dropped on. Since most 
  5740.               controls only have a single part, this value is normally just the 
  5741.               target control ID (e.g. 101). The exceptions are: 
  5742.  
  5743.    Container   The target ID is the container item the source object was 
  5744.                dropped on (0 if the object was dropped on empty space within 
  5745.                the container). 
  5746.  
  5747.    Value set   The target ID is the value set item the source object was 
  5748.                dropped on. This is a single number of the form: row + 65536 * 
  5749.                column. 
  5750.  
  5751. EventData.8   The location where the source object was dropped is returned as a 
  5752.               string of the form: x y, where x is the horizontal, and y is the 
  5753.               vertical, distance of the drop point from the lower left hand 
  5754.               corner of the dialog the target control is contained in. 
  5755.  
  5756. Note:  When a source object is dropped on a DrRexx control, it may generate 
  5757. more than one Drop event. For example, selecting several items in a drag 
  5758. enabled DrRexx list box and then dropping it onto a drop enabled control will 
  5759. generate one Drop event for each selected item in the list box. This is 
  5760. indicated visually during the drag operation by the appearance of several 
  5761. bitmaps (up to a maximum of four) staggered behind the pointer, instead of just 
  5762. a single bitmap. 
  5763.  
  5764.  
  5765. ΓòÉΓòÉΓòÉ 11. DrDialog specific controls ΓòÉΓòÉΓòÉ
  5766.  
  5767. Most of the controls available in the controls window palette are standard OS/2 
  5768. PM controls (e.g. pushbuttons, list boxes, containers, etc.). You should refer 
  5769. to the OS/2 Presentation Manager Programming Guide and the OS/2 Presentation 
  5770. Manager Programming Reference Volume III for detailed information about the 
  5771. purpose and programming interface for these controls. 
  5772.  
  5773. However, there are also a number of controls that are unique to DrDialog: 
  5774.  
  5775. o Billboard controls 
  5776. o Canvas controls 
  5777. o Paint controls 
  5778. o Bitmap button controls 
  5779. o Bagbutton controls 
  5780. o Turtle controls 
  5781. o Marquee controls 
  5782.  
  5783. If you use any of these controls in your dialogs, you will also need to have 
  5784. DRDIALOG.DLL in the LIBPATH when your application runs. 
  5785.  
  5786. In addition, prior to loading any dialogs containing DrDialog specific 
  5787. controls, your program must call UseDrDialog to initialize the DrDialog control 
  5788. window classes. This function has no arguments, and returns 1 if the DrDialog 
  5789. control window classes were successfully initialized, and 0 otherwise. You must 
  5790. link with the DRDIALOG.LIB file supplied with DrDialog in order to include 
  5791. UseDrDialog in your program. 
  5792.  
  5793. The DRDIALOG.H and DRDIALOG.OH files contain the function prototype for 
  5794. UseDrDialog for the C (C++) and Oberon languages respectively. 
  5795.  
  5796. These files also contain definitions for the various style bits supported by 
  5797. the DrDialog specific controls. You may need to use these if your application 
  5798. changes the style of any DrDialog specific controls at run-time. 
  5799.  
  5800.  
  5801. ΓòÉΓòÉΓòÉ 11.1. Billboard controls ΓòÉΓòÉΓòÉ
  5802.  
  5803. A billboard control is a bitmap used to dress up an otherwise boring dialog. It 
  5804. has a simple interface that requires no application programming, and a 
  5805. selection of styles that supports a wide variety of presentation techniques. 
  5806.  
  5807. The bitmap displayed in a billboard control is specified using the control's 
  5808. window text. The format of the text is either: [DLLname:]#resourceId (e.g. 
  5809. "BITMAP:#23"), or filename.BMP (e.g. C:\OS2\BITMAP\OS2LOGO.BMP). 
  5810.  
  5811. In the first form, the optional DLLname specifies the name of the DLL the 
  5812. bitmap can be found in. If omitted, the bitmap is assumed to be part of the 
  5813. application's EXE file. The resourceId specifies the resource number of the 
  5814. bitmap within the DLL or EXE file. 
  5815.  
  5816. In the second form, the bitmap is assumed to be stored in a standard .BMP file 
  5817. (e.g. a .BMP file created by IconEdit, the OS/2 icon editor). Note that the 
  5818. last four characters of the file name must be .BMP. 
  5819.  
  5820. The window text string can be specified using the text window or, for bitmaps 
  5821. stored in a DLL, using the billboard control's style dialog, displayed whenever 
  5822. button 2 is pressed while the pointer is over a billboard control. 
  5823.  
  5824. The billboard style dialog has a text entry field for specifying the name of 
  5825. the DLL to use (the default DLL is the BITMAP DLL supplied with DrDialog). 
  5826. Clicking the Load button opens the DLL and displays all of its bitmap resources 
  5827. in the array of billboard controls located below it. The scroll bar located 
  5828. next to the billboard controls can be used to scroll through the DLL's bitmap 
  5829. resources. Clicking any of the billboard controls in the style dialog will 
  5830. cause the associated billboard control in the edit dialog to display the same 
  5831. bitmap. The billboard control's window text will also be updated accordingly. 
  5832.  
  5833. The style dialog also allows various display characteristics of a billboard 
  5834. control to be set: 
  5835.  
  5836. Container: If selected, the billboard is a DrDialog container. It will appear 
  5837. below all non-container controls and can contain other controls (including 
  5838. other container controls). If not selected, the billboard control is a normal, 
  5839. non-container control. 
  5840.  
  5841. Mode: 
  5842.  
  5843. Scale        The bitmap is scaled to completely fill the control. 
  5844. Replicate    The bitmap is displayed at its normal size, but is replicated 
  5845.              (starting from the lower left corner) until the control is 
  5846.              completely filled. 
  5847. Center       A single, normal sized copy of the bitmap is displayed in the 
  5848.              center of the control. 
  5849.  
  5850. Speed: 
  5851.  
  5852. Stopped      The bitmap is displayed in a stationary position. 
  5853. Slow         The bitmap (or replicated copies of the bitmap) are scrolled 
  5854.              slowly. 
  5855. Medium       The bitmap is scrolled twice as fast as the slow speed. 
  5856. Fast         The bitmap is scrolled at its fastest speed. 
  5857.  
  5858. Direction: 
  5859.  
  5860. Left         The bitmap scrolls toward the left of the control. 
  5861. Right        The bitmap scrolls toward the right of the control. 
  5862. Top          The bitmap scrolls toward the top of the control. 
  5863. Bottom       The bitmap scrolls toward the bottom of the control. 
  5864.  
  5865. In addition, the standard PM control styles (Visible, Disabled, Tab stop, and 
  5866. Group) can also be specified in the billboard style dialog. 
  5867.  
  5868.  
  5869. ΓòÉΓòÉΓòÉ 11.2. Canvas controls ΓòÉΓòÉΓòÉ
  5870.  
  5871. A canvas control is similar to a group box. It is a DrDialog container control 
  5872. used to visually group other controls. It has a wide variety of visual styles 
  5873. which can be specified via its style bits. It also has an optional text label 
  5874. which can be modified using the text window. 
  5875.  
  5876. The visual appearance of a canvas control is specified using the canvas style 
  5877. dialog, displayed when button 2 is clicked while the pointer is in a canvas 
  5878. control. With the canvas style dialog you can select: 
  5879.  
  5880. Canvas styles/border width: 
  5881.  
  5882. Indented     The edge of the control has an indented look. 
  5883. Raised       The edge of the control has a raised look. 
  5884. Ridged       The edge of the control has either a ridged or grooved appearance, 
  5885.              depending on whether Raised or Indented is selected. This effect 
  5886.              may be turned on or off. 
  5887. Thickness    The thickness of the control edge can be selected using the spin 
  5888.              button. You can turn off the edge entirely by selecting a 
  5889.              thickness of 0. 
  5890.  
  5891. Horizontal text alignment: 
  5892.  
  5893. Left         The text label is left aligned in the control. 
  5894. Center       The text label is horizontally centered in the control. 
  5895. Right        The text label is right aligned in the control. 
  5896.  
  5897. Vertical text alignment: 
  5898.  
  5899. Top          The text label is top aligned in the control. 
  5900. Center       The text label is vertically centered in the control. 
  5901. Bottom       The text label is bottom aligned in the control. 
  5902.  
  5903. Text styles: 
  5904.  
  5905. Separator    A separator will be drawn to separate the text label from the rest 
  5906.              of the control. This effect can be turned on or off. If the text 
  5907.              label is not specified, or is both horizontally and vertically 
  5908.              centered, the separator is not drawn, even if requested. 
  5909.  
  5910. Canvas patterns: Any of 16 different background patterns for the control can be 
  5911. specified by clicking on the desired pattern. 
  5912.  
  5913. In addition, the standard PM control styles (Visible, Disabled, Tab stop, and 
  5914. Group) can also be specified in the canvas style dialog. 
  5915.  
  5916.  
  5917. ΓòÉΓòÉΓòÉ 11.3. Paint controls ΓòÉΓòÉΓòÉ
  5918.  
  5919. A paint control provides background color for a dialog. It is a DrDialog 
  5920. container control that mixes two colors, a paint color and a mix color, in 
  5921. various proportions to achieve a desired shade. 
  5922.  
  5923. The paint control's color is specified using the paint control's style dialog, 
  5924. displayed when button 2 of the pointer is clicked in a paint control. Click on 
  5925. the desired paint and mix colors, and use the mix value spin button to adjust 
  5926. their relative proportions. 
  5927.  
  5928.  
  5929. ΓòÉΓòÉΓòÉ 11.4. Bitmap button controls ΓòÉΓòÉΓòÉ
  5930.  
  5931. A bitmap button control is a push button that uses a bitmap instead of text to 
  5932. describe its function. The bitmap displayed is specified by the control's 
  5933. window text. The format of the text is either: [DLLname:]#resourceId (e.g. 
  5934. "BITMAP:#23"), or filename.BMP (e.g. C:\OS2\BITMAP\OS2LOGO.BMP). 
  5935.  
  5936. In the first form, the optional DLLname specifies the name of the DLL the 
  5937. bitmap can be found in. If omitted, the bitmap is assumed to be part of the 
  5938. application's EXE file. The resourceId specifies the resource number of the 
  5939. bitmap within the DLL or EXE file. 
  5940.  
  5941. In the second form, the bitmap is assumed to be stored in a standard .BMP file 
  5942. (e.g. a .BMP file created by IconEdit, the OS/2 icon editor). Note that the 
  5943. last four characters of the file name must be .BMP. 
  5944.  
  5945. The window text string can be specified using the text window or, for bitmaps 
  5946. stored in a DLL, using the bitmap button control's style dialog, displayed 
  5947. whenever button 2 is pressed while the pointer is over a bitmap button control. 
  5948.  
  5949. The bitmap button style dialog has a text entry field for specifying the name 
  5950. of the DLL to use (the default DLL is the BITMAP DLL supplied with DrDialog). 
  5951. Clicking the Load button opens the DLL and displays all of its bitmap resources 
  5952. in the array of bitmap button controls located below it. The scroll bar located 
  5953. next to the bitmap buttons can be used to scroll through the DLL's bitmap 
  5954. resources. Clicking any of the bitmap button in the style dialog will cause the 
  5955. associated bitmap button control in the edit dialog to display the same bitmap. 
  5956. The bitmap button control's window text will also be updated accordingly. 
  5957.  
  5958. In addition, the standard PM control styles (Visible, Disabled, Tab stop, and 
  5959. Group) can also be specified in the bitmap button style dialog. 
  5960.  
  5961.  
  5962. ΓòÉΓòÉΓòÉ 11.5. Bagbutton controls ΓòÉΓòÉΓòÉ
  5963.  
  5964. A bagbutton button control is a push button that allows other controls to be 
  5965. stacked on top of it as if they were held in a bag. The stacked controls behave 
  5966. visually as if they were part of the bagbutton control. That is, when the 
  5967. button is clicked, the controls held in the bagbutton will shift as part of the 
  5968. 3-D effect of the button press. The result is a composite button that behaves 
  5969. as if it were a single, seamless control. 
  5970.  
  5971. The bagbutton is also a DrDialog container control. Any controls placed on top 
  5972. of it will move with it when the bagbutton is moved. 
  5973.  
  5974. The normal appearance of a bagbutton includes: 
  5975.  
  5976. o Optional text 
  5977. o Optional LED. The LED will light whenever the bagbutton is in the 
  5978.   checked/pressed state. 
  5979.  
  5980. The text string can be specified using the text window. 
  5981.  
  5982. The visual appearance and behavior of a bagbutton control is specified using 
  5983. the bagbutton style dialog, displayed when button 2 is clicked while the 
  5984. pointer is in a bagbutton control. With the bagbutton style dialog you can 
  5985. select: 
  5986.  
  5987. Button style: 
  5988.  
  5989. Pushbutton      The bagbutton behaves like a pushbutton. 
  5990. Clicker         The bagbutton behaves like a clicker. A clicker is a button 
  5991.                 that sends its owner window a continuous stream of WM_COMMAND 
  5992.                 messages while the bagbutton is pressed. 
  5993. Check box       The bagbutton behaves like a check box. 
  5994. Radio button    The bag button behaves like a radio button. 
  5995.  
  5996. Clicker speed (i.e. rate at which WM_COMMAND messages are generated if the 
  5997. bagbutton has the clicker stlye): 
  5998.  
  5999. o Slow 
  6000. o Medium 
  6001. o Fast 
  6002. o Fastest 
  6003.  
  6004. LED style: 
  6005.  
  6006. o None (i.e. no LED) 
  6007. o Round 
  6008. o Rectangular 
  6009.  
  6010. LED color: 
  6011.  
  6012. o Red 
  6013. o Green 
  6014. o Yellow 
  6015. o Cyan 
  6016.  
  6017. Horizontal text/LED alignment: 
  6018.  
  6019. Left         The text label and/or LED is left aligned in the control. 
  6020. Center       The text label and/or LED is horizontally centered in the control. 
  6021. Right        The text label and/or LED is right aligned in the control. 
  6022.  
  6023. Vertical text/LED alignment: 
  6024.  
  6025. Top          The text label and/or LED is top aligned in the control. 
  6026. Center       The text label and/or LED is vertically centered in the control. 
  6027. Bottom       The text label and/or LED is bottom aligned in the control. 
  6028.  
  6029. Sizes: 
  6030.  
  6031. Border width    Thickness of the 3-D border around the bagbutton (1 to 4). 
  6032. Window shift    Amount by which other controls within the bagbutton are shifted 
  6033.                 when the button is pressed and released (0 to 3). 
  6034.  
  6035. Note:  Only controls which are transparent to the mouse should be placed on top 
  6036. of a bagbutton control. If the control is not pointer transparent, it will 
  6037. interefere with the correct operation of the bagbutton. Valid transparent 
  6038. controls are: 
  6039.  
  6040. o Billboard controls 
  6041. o Turtle controls 
  6042. o Marquee controls 
  6043. o Canvas controls 
  6044. o Paint controls 
  6045.  
  6046. Below are several examples of composite bagbutton controls along with a 
  6047. description of each button: 
  6048.  
  6049.  1. Bagbutton control and Marquee control 
  6050.  2. Bagbutton control with text and Billboard control 
  6051.  3. Bagbutton control with text and Turtle control 
  6052.  4. Bagbutton control with LED and Billboard control 
  6053.  
  6054.  
  6055. ΓòÉΓòÉΓòÉ 11.6. Turtle controls ΓòÉΓòÉΓòÉ
  6056.  
  6057. A turtle control is named after the turtle made famous by the Logo language. In 
  6058. Logo, a robotic turtle with a pen was controlled by means of simple commands to 
  6059. draw figures on a piece of paper. 
  6060.  
  6061. DrDialog turtle controls behave in much the same manner. The simple commands 
  6062. understood by a turtle control are specified using its window text. 
  6063.  
  6064. The window text can be specified using the text window or, more conveniently, 
  6065. using the turtle control's style dialog displayed when button 2 is pressed 
  6066. while the pointer is over a turtle control. 
  6067.  
  6068. The turtle style dialog has a text entry field for specifying the name of a 
  6069. text file containing one or more turtle control strings, one per line (the 
  6070. default file name is for the DRDIALOG.TUR file supplied with DrDialog). 
  6071. Clicking the Load button opens the file and displays each control string as it 
  6072. would appear in a turtle control in the array of turtle controls located below 
  6073. it. The scroll bar located next to the turtle controls can be used to scroll 
  6074. through the file's turtle control strings. Clicking any of the turtle controls 
  6075. in the style dialog will cause the associated turtle control in the edit dialog 
  6076. to display the same turtle control string. The turtle control's window text 
  6077. will also be updated accordingly. 
  6078.  
  6079. The turtle style dialog also allows various display characteristics of a turtle 
  6080. control to be set: 
  6081.  
  6082. Container: If selected, the turtle control is a DrDialog container. It will 
  6083. appear below all non-container controls and can contain other controls 
  6084. (including other container controls). If not selected, the turtle control is a 
  6085. normal, non-container control. 
  6086.  
  6087. Drawing color: The color the turtle control draws with can be specified by 
  6088. clicking on the desired color. 
  6089.  
  6090. Background color: The background color for the turtle control can be specified 
  6091. by clicking on the desired color. 
  6092.  
  6093. In addition, the standard PM control styles (Visible, Disabled, Tab stop, and 
  6094. Group) can also be specified in the turtle style dialog. 
  6095.  
  6096.  
  6097. ΓòÉΓòÉΓòÉ 11.6.1. Turtle control commands ΓòÉΓòÉΓòÉ
  6098.  
  6099. A turtle control interprets a simple command language. Each command consists of 
  6100. a single letter followed (in most cases) by an optional integer modifier. For 
  6101. example, the string "<urdl>" draws a filled box by giving the turtle the 
  6102. following commands: 
  6103.  
  6104. <     Put the drawing pen down on the paper (i.e. screen) 
  6105. u     Move up 
  6106. r     Move right 
  6107. d     Move down 
  6108. l     Move left 
  6109. >     Pick the drawing pen up 
  6110.  
  6111. The following commands are understand by a turtle control: 
  6112.  
  6113. f[n]      Set the fractional movement divisor to n. The initial value and 
  6114.           default is 100 (i.e. fractions are percentages). 
  6115. z[n]      Set the default fractional movement size to n. The initial value is 
  6116.           10, and the default value is no change. A fractional movement is a 
  6117.           movement expressed as a fraction of the total control width or height 
  6118.           (e.g. movement = (z * width) / f). 
  6119. Z[n]      Set the default absolute movement size to n. The initial value is 1 
  6120.           and the default value is no change. An absolute movement is a 
  6121.           movement expressed in pels. 
  6122. u[n]      Move the pen up n fractional units. The default value is the current 
  6123.           value of z. 
  6124. d[n]      Move the pen down n fractional units. The default value is the 
  6125.           current value of z. 
  6126. l         Move the pen left n fractional units. The default value is the 
  6127.           current value of z. 
  6128. r         Move the pen right n fractional units. The default value is the 
  6129.           current value of z. 
  6130. U         Move the pen up n absolute units. The default value is the current 
  6131.           value of Z. 
  6132. D         Move the pen down n absolute units. The default value is the current 
  6133.           value of Z. 
  6134. L         Move the pen left n absolute units. The default value is the current 
  6135.           value of Z. 
  6136. R         Move the pen right n absolute units. The default value is the current 
  6137.           value of Z. 
  6138. x[m[,n]]  Move the pen to the position whose fractional x coordinate is given 
  6139.           by m, and whose fractional y coordinate is given by n. The default 
  6140.           value for m is 0. If n is not specified, the current y coordinate of 
  6141.           the pen is not changed. 
  6142. y[m[,n]]  Move the pen to the position whose fractional y coordinate is given 
  6143.           by m, and whose fractional x coordinate is given by n. The default 
  6144.           value for m is 0. If n is not specified, the current x coordinate of 
  6145.           the pen is not changed. 
  6146. X[m[,n]]  Move the pen to the position whose absolute x coordinate is given by 
  6147.           m, and whose absolute y coordinate is given by n. The default value 
  6148.           for m is 0. If n is not specified, the current y coordinate of the 
  6149.           pen is not changed. 
  6150. Y[m[,n]]  Move the pen to the position whose absolute y coordinate is given by 
  6151.           m, and whose absolute x coordinate is given by n. The default value 
  6152.           for m is 0. If n is not specified, the current x coordinate of the 
  6153.           pen is not changed. 
  6154. c[n]      Set the drawing color of the turtle to n. This should be a number in 
  6155.           the range from 0 to 15. The initial and default values are 7 (black). 
  6156. b[n]      Set the background color of the turtle to n. This should be a number 
  6157.           in the range from 0 to 15. The initial and default values are 15 
  6158.           (gray). 
  6159. p[n]      Set the fill pattern for the turtle to n. This should be a number in 
  6160.           the range from 0 to 19. The initial and default values are 0 (solid 
  6161.           fill). 
  6162. <         Put the drawing pen down (i.e. on the screen). Figures can only be 
  6163.           drawn when the pen is down. The pen is initially up. 
  6164. >         Pick the drawing pen up (i.e. off the screen). No figures are drawn 
  6165.           when the pen is up. The pen is initially up. 
  6166. h[n]      Set the current heading to n degrees. This should be a number in the 
  6167.           range from 0 to 360. The initial and default values are 0 (i.e. up). 
  6168. a[n]      Set the default heading increment to n degrees. The initial value is 
  6169.           90, and the default is no change. 
  6170. t[n]      Increase the current heading by n degrees counter-clockwise. The 
  6171.           default value is the current value of a. 
  6172. T[n]      Increase the current heading by n degrees clockwise. The default 
  6173.           value is the current value of a. 
  6174. m[n]      Move the pen n fractional units in the current heading. The default 
  6175.           is the current value of z. 
  6176. M[n]      Move the pen n absolute units in the current heading. The default is 
  6177.           the current value of Z. 
  6178. '...'     Display the text between the two quote marks at the current pen 
  6179.           position using the current drawing color. The starting pen position 
  6180.           is at the lower left hand corner of the text displayed. 
  6181. "..."     Display the text between the two quote marks at the current pen 
  6182.           position using the current drawing color. The starting pen position 
  6183.           is at the lower left hand corner of the text displayed. 
  6184. [...]n    Do the commands in square brackets n times. The default value of n is 
  6185.           1. 
  6186. {...}c    Assign the commands in curly braces the name c (a single character, 
  6187.           which must be specified). 
  6188. =c        Interpret the series of commands previously given the name c (a 
  6189.           single character, which must be specified). 
  6190. (...)     Evaluate the series of pen movement commands enclosed in parentheses 
  6191.           without actually moving the pen. When the closing parenthesis in 
  6192.           encountered, move the pen to the final position computed. 
  6193.  
  6194. Note:  Characters, including blanks, which are not recognized as valid turtle 
  6195. commands are ignored. 
  6196.  
  6197. For some examples of turtle command strings, refer to the contents of the 
  6198. DRDIALOG.TUR file that comes with DrDialog. 
  6199.  
  6200.  
  6201. ΓòÉΓòÉΓòÉ 11.7. Marquee controls ΓòÉΓòÉΓòÉ
  6202.  
  6203. A marquee control is similar to a text control, but uses vector rather than 
  6204. bitmap fonts. As a result, any size text can be displayed simply by sizing the 
  6205. marquee control appropriately. The text for a marquee control can be entered 
  6206. using the text window. 
  6207.  
  6208. The visual appearance of a marquee control is controlled by its style bits and 
  6209. can be specified using the marquee style dialog displayed when button 2 is 
  6210. clicked while the pointer is in a marquee control. With the marquee style 
  6211. dialog you can select: 
  6212.  
  6213. Font: 
  6214.  
  6215. o Helvetica 
  6216. o Times Roman 
  6217. o Courier 
  6218. o Symbol Set 
  6219.  
  6220. Style: 
  6221.  
  6222. Bold         Displays the text using a bold version of the selected font. 
  6223. Italic       Displays the text using an italic version of the selected font. 
  6224. Embossed     Displays the text so that it appears to be embossed. If not 
  6225.              specified, the text will have an engraved appearance. The 
  6226.              embossed/engraved effect only applies if the text and background 
  6227.              color are the same. 
  6228.  
  6229. Speed: 
  6230.  
  6231. Stopped      The text is displayed stationary. The height of the control 
  6232.              determines the scaling of the text in both the horizontal and 
  6233.              vertical directions. 
  6234. Slow         The text is slowly scrolled from one side of the control to the 
  6235.              other. 
  6236. Medium       The text is scrolled somewhat faster than the slow rate. 
  6237. Fast         The text is scrolled at its fastest rate. 
  6238.  
  6239. Direction: 
  6240.  
  6241. Right->Left  The text is scrolled from right to left. This has no effect if 
  6242.              stopped is specified. 
  6243. Left->Right  The text is scrolled from left to right. This has no effect if 
  6244.              stopped is specified. 
  6245.  
  6246. Text color: The text color can be specified by clicking on the desired color. 
  6247.  
  6248. Background color: The background color for the control can be specified by 
  6249. clicking on the desired color. 
  6250.  
  6251. In addition, the standard PM control styles (Visible, Disabled, Tab stop, and 
  6252. Group) can also be specified in the marquee style dialog. 
  6253.  
  6254. Some examples of marquee controls are as follows: 
  6255.  
  6256.  
  6257. ΓòÉΓòÉΓòÉ 12. DrsAide ΓòÉΓòÉΓòÉ
  6258.  
  6259. DrsAide is an extension to DrDialog that allows new tools to be written using 
  6260. DrRexx and seamlessly integrated into the DrDialog programming environment. 
  6261.  
  6262. This section describes: 
  6263.  
  6264. o the extension mechanism to DrDialog provided by DrsAide 
  6265. o the default DrsAide tool provided with DrDialog 
  6266. o a suite of tools provided with DrDialog and written in DrRexx using the 
  6267.   DrsAide interface 
  6268. o how to go about writing your own DrsAide tools 
  6269.  
  6270.  
  6271. ΓòÉΓòÉΓòÉ 12.1. The DrsAide extension mechanism ΓòÉΓòÉΓòÉ
  6272.  
  6273. There are two components to the DrsAide extension mechanism: 
  6274.  
  6275. o The DrsAide tool 
  6276. o The DrDialog function 
  6277.  
  6278.  
  6279. ΓòÉΓòÉΓòÉ 12.2. The DrsAide tool ΓòÉΓòÉΓòÉ
  6280.  
  6281. The DrDialog Tools window and the Tools submenu of the DrDialog menu bar and 
  6282. pop-up menu contain the button. Clicking this button causes one of the 
  6283. following two actions to occur: 
  6284.  
  6285. o If the DrsAide tool is not running, DrDialog starts it. 
  6286. o If the DrsAide tool is running, DrDialog brings all of its associated windows 
  6287.   to the foreground. 
  6288.  
  6289. DrDialog starts the DrsAide tool running by executing the following command: 
  6290.  
  6291.    drdialogPath\DRREXX drdialogPath\DRSAIDE.RES -HdrdialogHandle
  6292.  
  6293. where drdialogPath is the fully qualified path from which the DrDialog .EXE 
  6294. file was invoked, and -HdrdialogHandle is the handle a DrRexx application needs 
  6295. to start a conversation with DrDialog using the Init subcommand of the DrDialog 
  6296. function. 
  6297.  
  6298. For example, the following command might be used to invoke the DrsAide tool: 
  6299.  
  6300.    D:\DRDIALOG\DRREXX D:\DRDIALOG\DRSAIDE.RES -H1482695048
  6301.  
  6302. Note:  The DrsAide.RES file must be in the same directory as the DrDialog.EXE 
  6303. file. 
  6304.  
  6305. From the above, it can be seen that the DrsAide tool must be a DrRexx 
  6306. application, and must be available in .RES file format (i.e. not .EXE file 
  6307. format). Other than that, the DrsAide.RES file can be any valid DrRexx 
  6308. application. If desired, it can use the -H command line argument passed to it 
  6309. to establish a conversation with DrDialog using the DrDialog function. However, 
  6310. it is not required to do so. 
  6311.  
  6312. DrDialog tracks whether DrsAide.RES is running or not. If DrsAide.RES 
  6313. terminates, DrDialog takes note of the fact and will automatically start a new 
  6314. copy the next time the button is clicked. 
  6315.  
  6316. DrDialog also treats the execution status of DrsAide.RES as a user preference 
  6317. item, and will automatically start DrsAide.RES when DrDialog is invoked if 
  6318. DrsAide.RES was running when DrDialog last terminated. 
  6319.  
  6320. If DrsAide.RES is already running when the button is clicked, DrDialog will 
  6321. simply bring all dialogs registered with DrDialog with the application name 
  6322. 'DrsAide' to the foreground (a dialog is registered with DrDialog using the 
  6323. Owner subcommand of the DrDialog function). 
  6324.  
  6325. Note:  It is normally not necessary to write the DrsAide.RES tool yourself. 
  6326. DrDialog is distributed with an extensible DrsAide.RES tool which will satisfy 
  6327. most requirements. This section simply documents the mechanism used in case it 
  6328. ever becomes necessary for you to write or modify the DrsAide.RES tool. 
  6329.  
  6330.  
  6331. ΓòÉΓòÉΓòÉ 12.3. The default DrsAide tool ΓòÉΓòÉΓòÉ
  6332.  
  6333. DrDialog is distributed with a default DrsAide.RES tool already defined. This 
  6334. tool is written in such a way as to allow new tools to be easily added to the 
  6335. system. 
  6336.  
  6337. The default DrsAide tool can actually be invoked in one of three ways: 
  6338.  
  6339. o From DrDialog, by clicking on the button. 
  6340. o From the Workplace Shell, by dropping a new or existing tool's .RES file icon 
  6341.   onto the DrsAide icon. 
  6342. o From the Workplace Shell, by double-clicking the DrsAide icon. 
  6343.  
  6344.  
  6345. ΓòÉΓòÉΓòÉ 12.3.1. Invoking the default DrsAide tool from DrDialog ΓòÉΓòÉΓòÉ
  6346.  
  6347. When invoked from DrDialog, DrsAide.RES displays a tool bar where each icon 
  6348. button represents a tool that can be invoked via DrsAide. The tool bar window 
  6349. can be moved to any desired screen position, and will remember its location 
  6350. each time the tool bar window is closed. This saved location will be used to 
  6351. position the icon bar the next time DrsAide is invoked from DrDialog. 
  6352.  
  6353. The position of the tool bar icon buttons can also be changed by dragging an 
  6354. icon button from its current location and dropping it on its new location. The 
  6355. new arrangement will be saved when the tool bar window is closed, and will be 
  6356. used to define the order of the icon buttons the next time DrsAide is invoked 
  6357. from DrDialog. 
  6358.  
  6359. Clicking an icon button in the DrsAide tool bar will do one of two things, 
  6360. depending upon the status of the corresponding tool: 
  6361.  
  6362. o If the tool is not running, DrsAide starts it. 
  6363. o If the tool is running, DrsAide brings all of its associated windows to the 
  6364.   foreground. 
  6365.  
  6366. Note that this is very similar to the actions taken by DrDialog with regard to 
  6367. the DrsAide tool. 
  6368.  
  6369. If the tool is not running, DrsAide starts it by executing a command of the 
  6370. form: 
  6371.  
  6372.    'START drdialogPath\DRREXX tool.RES -HdrdialogHandle iniFile'
  6373.  
  6374. where: 
  6375.  
  6376. o drdialogPath is the fully qualified path from which the DrDialog .EXE file 
  6377.   was invoked 
  6378. o tool.RES is the name of the DrRexx tool to be executed 
  6379. o -HdrdialogHandle is the handle a DrRexx application needs to start a 
  6380.   conversation with DrDialog using the Init subcommand of the DrDialog 
  6381.   function. 
  6382. o iniFile is the fully qualified name of the DrsAide.INI file that the tool can 
  6383.   use to save or restore information. 
  6384.  
  6385. For example, the following command might be used to invoke the CLOCK.RES sample 
  6386. program from DrsAide: 
  6387.  
  6388.    START D:\DRDIALOG\DRREXX D:\DRDIALOG\SAMPLE\CLOCK.RES
  6389.          -H1482695048 D:\DRDIALOG\DRSAIDE.INI
  6390.  
  6391. Note:  The tool.RES file can be in any directory (unlike the DrsAide.RES file, 
  6392. which must be in the same directory as the DrDialog.EXE file). 
  6393.  
  6394. From the above, it can be seen that, like DrsAide, any tool invoked from 
  6395. DrsAide must be a DrRexx application, and must be available in .RES file format 
  6396. (i.e. not .EXE file format). Other than that, a tool.RES file can be any valid 
  6397. DrRexx application. If desired, it can use the -H command line argument passed 
  6398. to it to establish a conversation with DrDialog using the DrDialog function. 
  6399. However, it is not required to do so. It can also use the iniFile passed to it 
  6400. to store long term tool specific information (e.g. the saved position of the 
  6401. tool window). More information on this is available in the section on writing a 
  6402. DrsAide tool.RES file. 
  6403.  
  6404. If the tool is already running when the tool's icon button is clicked, DrsAide 
  6405. will simply bring all dialogs registered with DrDialog using the tool's fully 
  6406. qualified .RES file name to the foreground (a dialog is registered with 
  6407. DrDialog using the Owner subcommand of the DrDialog function). 
  6408.  
  6409. Note:  Unlike DrDialog, DrsAide does not actually track the execution state of 
  6410. each tool it starts. DrsAide only tracks the dialogs registered with DrDialog. 
  6411. If a tool registers one or more dialogs with DrDialog, DrsAide will bring those 
  6412. dialogs to the foreground when the tool's icon button is clicked. If it has not 
  6413. registered any dialogs, DrsAide will simply launch another copy of the tool, 
  6414. even if the previous copy is still running. It is the tool writer's 
  6415. responsibility to register any necessary dialogs with DrDialog if they do not 
  6416. want multiple copies of the tool to be running simultaneously. 
  6417.  
  6418.  
  6419. ΓòÉΓòÉΓòÉ 12.3.2. Invoking the default DrsAide tool from the Workplace Shell ΓòÉΓòÉΓòÉ
  6420.  
  6421. Invoking DrsAide from the Workplace Shell allows you to add or delete tools 
  6422. from the tool bar that DrsAide displays when invoked from within DrDialog. 
  6423.  
  6424. To add or delete a single tool, simply drag its .RES file icon and drop it on 
  6425. the DrsAide icon in the DrDialog folder. If the tool is not already known to 
  6426. DrsAide, it will add the tool to the tool bar. If the tool is already in the 
  6427. tool bar, DrsAide will prompt to see if you wish to delete the tool or cancel 
  6428. the request. If you specify delete, the tool will be removed from the DrsAide 
  6429. tool bar. If you specify cancel, no action will be taken. 
  6430.  
  6431. When either adding or deleting a tool, no change to the DrsAide tool bar will 
  6432. occur until the next time DrsAide is invoked from within DrDialog. 
  6433.  
  6434. In order to display an appropriate bitmap button in the DrsAide tool bar, each 
  6435. tool added to DrsAide must have a corresponding .BMP file. The .BMP file must 
  6436. reside in the same directory and have the same name (with a .BMP extension) as 
  6437. the .RES file it corresponds to. If no .BMP file with this name is found, 
  6438. DrsAide will not add the specified .RES file to its tool bar. The size of the 
  6439. bitmap contained in the .BMP file should also be 40 x 40 in order to be 
  6440. consistent with other DrsAide tools. 
  6441.  
  6442. You can also directly edit the set of installed DrsAide tools by 
  6443. double-clicking the DrsAide icon in the DrDialog folder. A dialog containing a 
  6444. list of tools currently installed will appear. You can then: 
  6445.  
  6446. o Delete a tool by selecting its entry and clicking the Delete button. 
  6447. o Add a tool by typing its .RES file name into the appropriate entry field and 
  6448.   clicking the Add button. If the specified .RES file exists and is not already 
  6449.   installed, it will be added as a new DrsAide tool immediately after the 
  6450.   currently selected entry in the list of installed tools. If the .BMP file 
  6451.   entry field is not empty, the specified file will be used as the name of the 
  6452.   .BMP file to use for the tool's icon button. If it is empty, the .RES file's 
  6453.   name with a .BMP extension will be used as the name of the .BMP file. 
  6454. o Change the name of the .BMP file to use for a tool's icon button by clicking 
  6455.   on its .BMP file name while holding the Alt key. This will allow you to edit 
  6456.   the name of the .BMP file. When you are done editing, click on any other 
  6457.   field to indicate you are done. 
  6458.  
  6459. You can also copy a currently installed tool's information into the entry 
  6460. fields by double-clicking its entry in the list. This is useful when you wish 
  6461. to move a tool from one location in the DrsAide tool bar to another. Simply 
  6462. double-click the entry to move (thus copying its information into the entry 
  6463. fields), then click the Delete button. Then select the list entry preceding the 
  6464. new location you wish to use and click the Add button. 
  6465.  
  6466. When you are finished making changes, click the Save button to permanently 
  6467. update the installed tool's information. No permanent changes are made until 
  6468. the Save button is clicked. 
  6469.  
  6470.  
  6471. ΓòÉΓòÉΓòÉ 12.4. DrDialog function ΓòÉΓòÉΓòÉ
  6472.  
  6473. result = DrDialog( subcommand [, arguments] )
  6474.  
  6475. The DrDialog function is the mechanism by which DrDialog tools written using 
  6476. DrRexx communicate with DrDialog. The subcommand argument specifies which of 27 
  6477. different subcommands are to be executed by DrDialog in response to the 
  6478. DrDialog function request. The additional arguments, if any, following the 
  6479. subcommand depend on the particular subcommand specified. 
  6480.  
  6481. The available subcommands are as follows: 
  6482.  
  6483. Init          Initialize conversation with DrDialog 
  6484. Owner         Set window owner 
  6485. FOCus         Give focus to .RES files windows 
  6486. GEtres        Get current .RES contents 
  6487. SETres        Set current .RES contents 
  6488. FIlename      Get current .RES file name 
  6489. Modified      Get/Set modified flag 
  6490. DIALOGS       Get all dialogs 
  6491. CONTROLS      Get all controls for current dialog 
  6492. EVENTS        Get events for a control type 
  6493. GLOBALS       Get global procedure names 
  6494. GLOBAL        Get/Set global procedure code 
  6495. NEWDialog     Create new dialog 
  6496. NEWControl    Create new control 
  6497. DROPDialog    Delete dialog 
  6498. DROPControl   Delete control 
  6499. DIALOG        Get/Select current dialog 
  6500. CONTROL       Get/Select current control 
  6501. SELect        Get/Select current selected controls 
  6502. NAme          Get/Set control name 
  6503. Text          Get/Set control text 
  6504. Position      Get/Set control size/position 
  6505. STyle         Get/Set control style 
  6506. FONt          Get/Set control font 
  6507. COLor         Get/Set control color 
  6508. EVENT         Get/Set control event handler 
  6509. CLass         Get/Set control class handler 
  6510.  
  6511. Note:  In the above list of subcommands, capital letters indicate characters 
  6512. required to identify the subcommand, while lower case letters indicate optional 
  6513. characters that can be specified if desired. 
  6514.  
  6515.  
  6516. ΓòÉΓòÉΓòÉ 12.4.1. DrDialog 'Init' subcommand ΓòÉΓòÉΓòÉ
  6517.  
  6518. CALL DrDialog 'Init', handle
  6519.  
  6520. Initializes a conversation with the DrDialog session identified by handle. 
  6521. Handle must be the string of characters starting with '-H' that is passed as 
  6522. the first command line argument when a DrsAide tool is invoked. 
  6523.  
  6524. This DrDialog subcommand must be the first one issued by a tool wishing to 
  6525. interact with DrDialog. Failure to do so, or specifying an invalid handle, will 
  6526. result in all subsequent DrDialog function calls generating an error. 
  6527.  
  6528. This function need only be issued once. All subsequent DrDialog functions will 
  6529. automatically direct their requests to the DrDialog session specified by 
  6530. handle. If a single tool needs to talk to more than one DrDialog session, an 
  6531. Init subcommand must be issued every time a different DrDialog session is to be 
  6532. addressed. 
  6533.  
  6534.  
  6535. ΓòÉΓòÉΓòÉ 12.4.2. DrDialog 'Owner' subcommand ΓòÉΓòÉΓòÉ
  6536.  
  6537. CALL DrDialog 'Owner', dialog [, toolName]
  6538.  
  6539. Specifies that DrDialog is to own the tool dialog specified by dialog, and that 
  6540. the dialog is to be registered as belonging to the tool specified by toolName. 
  6541. If toolName is not specified, it defaults to the fully qualified name of the 
  6542. tool's .RES file. 
  6543.  
  6544. Owning a dialog allows DrDialog to display the dialog as part of its collection 
  6545. of tool windows and prevents the dialog from disappearing behind the DrDialog 
  6546. background window. 
  6547.  
  6548. DrDialog also divides the windows it owns into one or more collections 
  6549. organized by tool name. The DrDialog Focus subcommand can be used to bring all 
  6550. dialogs belonging to a particular tool back to the foreground. 
  6551.  
  6552. Note:  The standard DrRexx Owner function can be used to take ownership of the 
  6553. dialog away from DrDialog at some later point if desired. 
  6554.  
  6555.  
  6556. ΓòÉΓòÉΓòÉ 12.4.3. DrDialog 'Focus' subcommand ΓòÉΓòÉΓòÉ
  6557.  
  6558. rc = DrDialog( 'FOCus', toolName )
  6559.  
  6560. Requests that DrDialog bring all dialogs registered as belonging to toolName to 
  6561. the foreground. It returns 0 if no dialogs belonging to toolName are found; and 
  6562. 1 otherwise. 
  6563.  
  6564. Dialogs are registered with DrDialog using the DrDialog Owner subcommand. 
  6565.  
  6566.  
  6567. ΓòÉΓòÉΓòÉ 12.4.4. DrDialog 'GetRES' subcommand ΓòÉΓòÉΓòÉ
  6568.  
  6569. resData = DrDialog( 'GEtres' )
  6570.  
  6571. Requests that DrDialog capture and return the contents of the current set of 
  6572. dialogs being edited in .RES file format. That is, it behaves as if the user 
  6573. had requested that the current edit session be saved to a file, and returns 
  6574. what DrDialog would have written to the .RES file as the result. 
  6575.  
  6576. The format of the resData returned is that of a standard OS/2 resource file 
  6577. with the addition of a few new resource types unique to DrDialog/DrRexx. 
  6578.  
  6579.  
  6580. ΓòÉΓòÉΓòÉ 12.4.5. DrDialog 'SetRES' subcommand ΓòÉΓòÉΓòÉ
  6581.  
  6582. rc = DrDialog( 'SETres', resData )
  6583.  
  6584. Requests that DrDialog discard all current dialogs being edited and load the 
  6585. set of dialogs specified by resData. Returns 1 if successful, and 0 otherwise. 
  6586.  
  6587. ResData must be structurally equivalent to the contents of a valid resource 
  6588. (i.e. .RES) file created by DrDialog. 
  6589.  
  6590. Note:  When DrDialog receives this request, it will discard the current set of 
  6591. dialogs being edited, even if changes have been made. It is the tool writer's 
  6592. responsibility to prevent the user from losing data. The DrDialog Modified 
  6593. subcommand can be used to check if changes have been made in the current 
  6594. DrDialog edit session. 
  6595.  
  6596.  
  6597. ΓòÉΓòÉΓòÉ 12.4.6. DrDialog 'Filename' subcommand ΓòÉΓòÉΓòÉ
  6598.  
  6599. oldFilename = DrDialog( 'FIlename' [, newFilename] )
  6600.  
  6601. Returns the name of the current .RES file being edited by DrDialog, or the null 
  6602. string if no file name has been specified. If newFilename is specified, 
  6603. DrDialog saves it as the new name of the file being edited. 
  6604.  
  6605.  
  6606. ΓòÉΓòÉΓòÉ 12.4.7. DrDialog 'Modified' subcommand ΓòÉΓòÉΓòÉ
  6607.  
  6608. oldModified = DrDialog( 'Modified', newModified )
  6609.  
  6610. Returns 1 if changes have been made to the set of dialogs currently being 
  6611. edited by DrDialog, and 0 if no changes have been made. If newModified is 
  6612. specified, it sets the modified state of DrDialog to modified if newModified is 
  6613. not zero, and to unmodified if newModified is 0. 
  6614.  
  6615.  
  6616. ΓòÉΓòÉΓòÉ 12.4.8. DrDialog 'Dialogs' subcommand ΓòÉΓòÉΓòÉ
  6617.  
  6618. dialogs = DrDialog( 'DIALOGS' )
  6619.  
  6620. Returns as a blank delimited string the ID numbers of all dialogs currently 
  6621. being edited by DrDialog (e.g. '100 200 300'). 
  6622.  
  6623.  
  6624. ΓòÉΓòÉΓòÉ 12.4.9. DrDialog 'Controls' subcommand ΓòÉΓòÉΓòÉ
  6625.  
  6626. controls = DrDialog( 'CONTROLS' )
  6627.  
  6628. Returns as a blank delimited string the ID numbers of all controls in the 
  6629. current dialog being edited by DrDialog (e.g. '100 101 102 111'). The ID number 
  6630. of the dialog frame is always the first ID returned. 
  6631.  
  6632.  
  6633. ΓòÉΓòÉΓòÉ 12.4.10. DrDialog 'Events' subcommand ΓòÉΓòÉΓòÉ
  6634.  
  6635. events = DrDialog( 'EVENTS', class )
  6636.  
  6637. Returns as a blank delimited string the names of all events defined for the 
  6638. control type specified by class. For example, if class is PUSHBUTTON, the 
  6639. result is 'Click Init'. 
  6640.  
  6641.  
  6642. ΓòÉΓòÉΓòÉ 12.4.11. DrDialog 'Globals' subcommand ΓòÉΓòÉΓòÉ
  6643.  
  6644. dialogs = DrDialog( 'DIALOGS' )
  6645.  
  6646. Returns as a blank delimited string the names of all global procedures 
  6647. currently defined by the DrDialog session (e.g. 'Init AddDigit FormatData'). 
  6648.  
  6649.  
  6650. ΓòÉΓòÉΓòÉ 12.4.12. DrDialog 'Global' subcommand ΓòÉΓòÉΓòÉ
  6651.  
  6652. oldCode = DrDialog( 'GLOBAL', name [, newCode] )
  6653.  
  6654. Returns the definition of the global procedure specified by name in the current 
  6655. DrDialog session. If newCode is specified, it replaces the current definition 
  6656. of name, unless newCode is the null string, in which case name is deleted. 
  6657.  
  6658. If name is not defined, the null string is returned. If name is not defined and 
  6659. newCode is specified and not the null string, name is added to the list of 
  6660. global procedures. 
  6661.  
  6662.  
  6663. ΓòÉΓòÉΓòÉ 12.4.13. DrDialog 'NewDialog' subcommand ΓòÉΓòÉΓòÉ
  6664.  
  6665. actualId = DrDialog( 'NEWDialog' [, newId] )
  6666.  
  6667. Requests DrDialog to create a new dialog and select it for editing. If newId is 
  6668. specified, DrDialog attempts to assign newId as the ID of the new dialog. It 
  6669. returns the actual ID assigned to the new dialog (which may be different from 
  6670. newId if newId is already in use). 
  6671.  
  6672.  
  6673. ΓòÉΓòÉΓòÉ 12.4.14. DrDialog 'NewControl' subcommand ΓòÉΓòÉΓòÉ
  6674.  
  6675. actualId = DrDialog( 'NEWControl', id/class [, newId] )
  6676.  
  6677. Requests DrDialog to create a new control, either cloning an existing control 
  6678. with a specified id, or having a specified class. If newId is specified, 
  6679. DrDialog attempts to assign newId as the ID of the new control. It returns the 
  6680. actual ID assigned to the new control (which may be different from newId if 
  6681. newId is already in use). 
  6682.  
  6683. If id is specified, it must be the ID of an existing control which is not of 
  6684. type DIALOG. The newly created control will be identical to id, including its 
  6685. size and position. 
  6686.  
  6687. If class is specified, it must be a valid DrDialog control type, but not DIALOG 
  6688. (e.g. PUSHBUTTON). A new control of the specified type will be created and 
  6689. positioned in the center of the current dialog being edited. 
  6690.  
  6691.  
  6692. ΓòÉΓòÉΓòÉ 12.4.15. DrDialog 'DropDialog' subcommand ΓòÉΓòÉΓòÉ
  6693.  
  6694. CALL DrDialog 'DROPDialog' [, id]
  6695.  
  6696. Requests DrDialog to discard the dialog specified by id. If id is omitted, it 
  6697. defaults to the current dialog being edited. 
  6698.  
  6699. If the dialog being discarded is the current dialog, DrDialog will 
  6700. automatically select another dialog as the new current dialog. If there are no 
  6701. other dialogs, DrDialog will automatically create a new empty dialog. 
  6702.  
  6703.  
  6704. ΓòÉΓòÉΓòÉ 12.4.16. DrDialog 'DropControl' subcommand ΓòÉΓòÉΓòÉ
  6705.  
  6706. CALL DrDialog 'DROPControl' [, id]
  6707.  
  6708. Requests DrDialog to discard the control specified by id. If id is omitted, it 
  6709. defaults to the current selected control, if any. 
  6710.  
  6711.  
  6712. ΓòÉΓòÉΓòÉ 12.4.17. DrDialog 'Dialog' subcommand ΓòÉΓòÉΓòÉ
  6713.  
  6714. oldId = DrDialog( 'DIALOG' [, newId] )
  6715.  
  6716. Returns the ID of the current dialog being edited by DrDialog. If newId is 
  6717. specified, it requests that DrDialog select the specified dialog as the new 
  6718. current dialog being edited. 
  6719.  
  6720.  
  6721. ΓòÉΓòÉΓòÉ 12.4.18. DrDialog 'Control' subcommand ΓòÉΓòÉΓòÉ
  6722.  
  6723. oldId    = DrDialog( 'CONTROL' [, newId] )
  6724. actualId = DrDialog( 'CONTROL', id, newId )
  6725.  
  6726. In the first form, it returns the ID of the current active DrDialog control, if 
  6727. any. If no control is currently active, it returns the null string. If newId is 
  6728. specified, it requests that DrDialog deselect all current controls and select 
  6729. newId as the new active control. 
  6730.  
  6731. If the second form is used, it requests that DrDialog assign newId as the new 
  6732. ID of the control whose current ID is id. The actual new ID assigned is 
  6733. returned as the result (it may be different from newId if newId is already in 
  6734. use). 
  6735.  
  6736.  
  6737. ΓòÉΓòÉΓòÉ 12.4.19. DrDialog 'Select' subcommand ΓòÉΓòÉΓòÉ
  6738.  
  6739. oldIdList = DrDialog( 'SELect' [, newIdList] )
  6740.  
  6741. Returns as a blank delimited string the IDs of all currently selected DrDialog 
  6742. controls (e.g. '105 101 118'). The first ID in the list is always the current 
  6743. active control. If no controls are currently selected, the null string is 
  6744. returned. 
  6745.  
  6746. If newIdList is specified, DrDialog unselects all currently selected controls 
  6747. and selects all the controls specified in newIdList, which should be a blank 
  6748. delimited list of control IDs, with the first ID in the list being the ID of 
  6749. the new active control. 
  6750.  
  6751. Note:  Not all controls in newIdList may end up being selected. DrDialog does 
  6752. not allow a container control and any of its contained controls to be selected 
  6753. at the same time. 
  6754.  
  6755.  
  6756. ΓòÉΓòÉΓòÉ 12.4.20. DrDialog 'Name' subcommand ΓòÉΓòÉΓòÉ
  6757.  
  6758. oldName = DrDialog( 'NAme', id [, newName] )
  6759.  
  6760. Returns the name currently assigned to the DrDialog control or dialog whose ID 
  6761. is specified by id. If no name is currently assigned to id, the null string is 
  6762. returned. 
  6763.  
  6764. If newName is specified, DrDialog attempts to assign it as the new name for the 
  6765. control or dialog specified by id. 
  6766.  
  6767. Note:  If newName has already been assigned to another control or dialog, 
  6768. DrDialog will attach a numeric suffix of the form _n to newName and use that as 
  6769. the new assigned name. 
  6770.  
  6771.  
  6772. ΓòÉΓòÉΓòÉ 12.4.21. DrDialog 'Text' subcommand ΓòÉΓòÉΓòÉ
  6773.  
  6774. oldText = DrDialog( 'Text', id [, newText] )
  6775.  
  6776. Returns the text currently associated with the DrDialog control whose ID is 
  6777. specified by id. 
  6778.  
  6779. If newText is specified, DrDialog replaces the current text with newText. 
  6780.  
  6781. The text associated with a control varies from control to control. For a 
  6782. pushbutton, it is its label. For a dialog, it is its window bar title. For a 
  6783. multi-line edit control, it is the complete text contained within the control. 
  6784. Other controls may have not any text associated with them (e.g. a Rectangle 
  6785. control). In that case, the result returned is the null string, and any value 
  6786. set is ignored. 
  6787.  
  6788.  
  6789. ΓòÉΓòÉΓòÉ 12.4.22. DrDialog 'Position' subcommand ΓòÉΓòÉΓòÉ
  6790.  
  6791. oldPos = DrDialog( 'Position', id [, newPos] )
  6792. oldPos = DrDialog( 'Position', id [, newX  [, newY
  6793.                                   [, newDX [, newDY]]]] )
  6794.  
  6795. Returns the current position and size of the DrDialog control whose ID is 
  6796. specified by id as a string of the form: x y dx dy, where x y is the coordinate 
  6797. of the lower left hand corner of the control, and dx dy is the width and height 
  6798. of the control in pels. 
  6799.  
  6800. If newPos is specified, DrDialog sets the new size and position of the control 
  6801. using the values in newPos, which should be a string of the form: x y dx dy. If 
  6802. any trailing values are omitted, their current values remain unchanged. 
  6803.  
  6804. If newX, newY, newDX and newDY are specified, DrDialog uses these values to set 
  6805. the new position and size of the control. If any trailing arguments are 
  6806. omitted, their current values remains unchanged. 
  6807.  
  6808. In either case, DrDialog will adjust the values specified if the resulting size 
  6809. or position would place the control outside the boundaries of the current 
  6810. dialog (or the screen if the control specified is the dialog frame). 
  6811.  
  6812.  
  6813. ΓòÉΓòÉΓòÉ 12.4.23. DrDialog 'Style' subcommand ΓòÉΓòÉΓòÉ
  6814.  
  6815. oldStyle = DrDialog( 'STyle', id [, newStyle] )
  6816.  
  6817. Returns the style currently associated with the DrDialog control whose ID is 
  6818. specified by id. The style returned is always a four byte long string whose 
  6819. bits correspond to the style bit mask associated with the control. 
  6820.  
  6821. If newStyle is specified, DrDialog replaces the current style mask with 
  6822. newStyle, which must also be a four byte long string encoding the new style bit 
  6823. mask for the control. 
  6824.  
  6825.  
  6826. ΓòÉΓòÉΓòÉ 12.4.24. DrDialog 'Font' subcommand ΓòÉΓòÉΓòÉ
  6827.  
  6828. oldFont = DrDialog( 'FONt', id [, newFont] )
  6829.  
  6830. Returns the font currently associated with the DrDialog control whose ID is 
  6831. specified by id. The font is returned as a string of the form: size.name, where 
  6832. size is the point size, and name is the family name of the font (e.g. 
  6833. 10.Courier). If the current font is the default font for the control, the null 
  6834. string is returned. 
  6835.  
  6836. If newFont is specified, DrDialog replaces the current font with newFont, which 
  6837. must also be a string of the form: size.name or the null string. If the null 
  6838. string is specified, DrDialog resets the font for the control back to the 
  6839. default font. 
  6840.  
  6841.  
  6842. ΓòÉΓòÉΓòÉ 12.4.25. DrDialog 'Color' subcommand ΓòÉΓòÉΓòÉ
  6843.  
  6844. oldColor = DrDialog( 'COLor', id , attribute [, newColor] )
  6845.  
  6846. Returns the specified color attribute for the DrDialog control whose ID is 
  6847. specified by id. 
  6848.  
  6849. Attribute specifies which color attribute the function applies to. The 
  6850. attribute consists of a string of characters, each of which specifies a color 
  6851. attribute modifier. The defined attribute modifiers are as follows: 
  6852.  
  6853. +         Foreground (group 1) 
  6854. -         Background (group 1) 
  6855. A         Active (group 2) 
  6856. I         Inactive (group 2) 
  6857. H         Highlight (group 2) 
  6858. D         Disabled (group 2) 
  6859. T         Text (group 3) 
  6860. M         Menu (group 3) 
  6861. B         Border (group 3) 
  6862.  
  6863. The three groups represent more or less disjoint sets of attributes. In forming 
  6864. an attribute name, no more than one character from each group should be used. 
  6865. However, not all combinations of characters specify a valid color attribute. 
  6866. The list of valid color attribute character combinations is as follows: 
  6867.  
  6868. +         Foreground color 
  6869. -         Background color 
  6870. A         Active color 
  6871. I         Inactive color 
  6872. AT+       Active text foreground color 
  6873. AT-       Active text background color 
  6874. IT+       Inactive text foreground color 
  6875. IT-       Inactive text background color 
  6876. H+        Highlight foreground color 
  6877. H-        Highlight background color 
  6878. D+        Disabled foreground color 
  6879. D-        Disabled background color 
  6880. M+        Menu foreground color 
  6881. M-        Menu background color 
  6882. MH+       Menu highlight foreground color 
  6883. MH-       Menu highlight background color 
  6884. MD+       Menu disabled foreground color 
  6885. MD-       Menu disabled background color 
  6886. B         Border color 
  6887.  
  6888. Note:  The order of the characters in attribute does not matter. 
  6889.  
  6890. Not all controls support all color attributes. The most commonly supported 
  6891. attributes are foreground and background color. 
  6892.  
  6893. If newColor is specified, the specified control color attribute is replaced by 
  6894. newColor. 
  6895.  
  6896. Note:  A color is specified as a string of the form: 
  6897.  
  6898.    #index
  6899. or #red green blue
  6900.  
  6901. where index is a color index, and red, green and blue are the color components 
  6902. of an RGB triplet (each component should be in the range 0 to 255). 
  6903.  
  6904. The result of the function is also one of these two forms, depending on which 
  6905. form was originally used to set the corresponding color attribute. 
  6906.  
  6907. Note:  If no color attribute has been specified for a control, the null string 
  6908. is returned as the result. 
  6909.  
  6910.  
  6911. ΓòÉΓòÉΓòÉ 12.4.26. DrDialog 'Event' subcommand ΓòÉΓòÉΓòÉ
  6912.  
  6913. oldCode = DrDialog( 'EVENT', id, event [, newCode] )
  6914.  
  6915. Returns the REXX event handler code currently associated with the event 
  6916. specified by event for the DrDialog control whose ID is specified by id. 
  6917.  
  6918. Event must be a valid event for the class of control specified by id (e.g. the 
  6919. valid events for a control of class PUSHBUTTON are Init and Click). A list of 
  6920. valid event names for a particular class of control can be obtained using the 
  6921. Event subcommand of the DrDialog function. 
  6922.  
  6923. If newCode is specified, it replaces the current event handler for the 
  6924. specified event and id. If newCode is specified, but is the null string, the 
  6925. current event handler for event and id is deleted. 
  6926.  
  6927.  
  6928. ΓòÉΓòÉΓòÉ 12.4.27. DrDialog 'Class' subcommand ΓòÉΓòÉΓòÉ
  6929.  
  6930. class   = DrDialog( 'CLass', id )
  6931. oldCode = DrDialog( 'CLass', class, event [, newCode] )
  6932.  
  6933. In the first case, it returns the class of the DrDialog control whose ID is 
  6934. specified by id. 
  6935.  
  6936. In the second case, it returns the REXX class handler code currently associated 
  6937. with the event specified by event for the DrDialog control class specified by 
  6938. class. 
  6939.  
  6940. Event must be a valid event for the class of control specified by class (e.g. 
  6941. if class is PUSHBUTTON the valid events are Init and Click). A list of valid 
  6942. event names for a particular class of control can be obtained using the Event 
  6943. subcommand of the DrDialog function. 
  6944.  
  6945. If newCode is specified, it replaces the current class handler for the 
  6946. specified event and class. If newCode is specified, but is the null string, the 
  6947. current class handler for event and class is deleted. 
  6948.  
  6949.  
  6950. ΓòÉΓòÉΓòÉ 12.5. DrsAide tools ΓòÉΓòÉΓòÉ
  6951.  
  6952. The DrDialog package includes a number of tools written in DrRexx using the 
  6953. DrsAide extension mechanism. These tools are intended to both increase the 
  6954. power and usefulness of the DrDialog programming environment as well as to 
  6955. illustrate how to write additional DrsAide tools. 
  6956.  
  6957. Some of the tools are pre-installed in the DrsAide tool, while others can be 
  6958. installed at the user's discretion using the methods discussed in the section 
  6959. on using the default DrsAide tool from the Workplace Shell. The available tools 
  6960. are: 
  6961.  
  6962. Array           Generates and lays out a rectangular grid of controls 
  6963.                 (pre-installed) 
  6964.  
  6965. REView          Displays the current set of dialogs in outline form 
  6966.                 (pre-installed) 
  6967.  
  6968. REStoRXX        Writes all REXX source code for the current set of dialogs into 
  6969.                 an annotated listing file (pre-installed) 
  6970.  
  6971. RexxLib         Browses all code currently stored in the REXX library 
  6972.                 (pre-installed) 
  6973.  
  6974. RexxUse         Includes as global procedures all REXX library routines 
  6975.                 referenced by the current set of dialogs (pre-installed) 
  6976.  
  6977. BMPList.RES     Displays .BMP and .GIF files (optional tool available in the 
  6978.                 SAMPLE subdirectory) 
  6979.  
  6980. Clock.RES       Simple clock (optional tool available in the SAMPLE 
  6981.                 subdirectory) 
  6982.  
  6983. Clock2.RES      Fancier clock (optional tool available in the SAMPLE 
  6984.                 subdirectory) 
  6985.  
  6986. Calc.RES        Simple calculator (optional tool available in the SAMPLE 
  6987.                 subdirectory) 
  6988.  
  6989.  
  6990. ΓòÉΓòÉΓòÉ 12.5.1. Array tool ΓòÉΓòÉΓòÉ
  6991.  
  6992. The array tool provides a simple interface for creating and laying out 
  6993. rectangular grids of the same kind of control (e.g. a grid of ICONBUTTONs for a 
  6994. tool bar). 
  6995.  
  6996. To use the array tool: 
  6997.  
  6998.  1. Make an instance of the control you wish to create an array of. 
  6999.  2. Initialize and set its attributes (i.e. size, text, font, colors, style). 
  7000.  3. Position it at the top-left corner of the rectangular array you wish to 
  7001.     create. 
  7002.  4. Invoke the array tool from the DrsAide tool by clicking the button. 
  7003.  5. Use the appropriately labeled spin buttons in the array tool to specify the 
  7004.     number of rows and columns the array of controls is to have. 
  7005.  6. Use the appropriately labeled spin buttons to specify the horizontal and 
  7006.     vertical spacing between controls in the array. 
  7007.  7. Click the Create button to create the array of controls and lay them out. 
  7008.  
  7009. If the spacing is not quite right, simply change the values displayed in the 
  7010. spacing spin buttons and click the Space button to lay out the controls in the 
  7011. array again. Repeat this step until you are satisfied with the layout. 
  7012.  
  7013. If you make a mistake or change your mind, you can delete all the controls in 
  7014. the array (except the original) by clicking the Delete button. 
  7015.  
  7016. Once you are finished you can either close the array tool, or click the Done 
  7017. button to signal that you are ready to create a new array of controls. 
  7018.  
  7019. Note:  The Create button creates an array of controls using the currently 
  7020. selected control as its template. It copies the class, size, text, font, colors 
  7021. and style of the selected control to each new control in the array. Once an 
  7022. array of controls has been created, clicking the Done button re-enables the 
  7023. Create button and allows a new array of controls to be created from the 
  7024. currently selected control. 
  7025.  
  7026.  
  7027. ΓòÉΓòÉΓòÉ 12.5.2. REView tool ΓòÉΓòÉΓòÉ
  7028.  
  7029. The review tool displays the current set of dialogs being edited in outline 
  7030. form. The outline consists of labeled icons, each representing a particular 
  7031. dialog or dialog component. 
  7032.  
  7033. Initially, the outline is in its collapsed form, with only the dialog and 
  7034. global procedure icons displayed. Clicking the plus sign to the left of an icon 
  7035. expands the outline to include the components of the icon. 
  7036.  
  7037. In the case of a dialog icon, expanding it displays an icon for each control 
  7038. within the dialog, including the frame and drop-down menu if any. Further 
  7039. expanding a control icon displays icons for each event or class handler defined 
  7040. for the control. Expanding a drop-down menu icon displays icons for each 
  7041. submenu or menu item. 
  7042.  
  7043. Expanding the global procedures icon displays an icon for each defined global 
  7044. procedure. 
  7045.  
  7046. Double-clicking an icon that represents code, such as a global procedure or 
  7047. control event handler, displays its associated REXX code in the tool's edit 
  7048. control. Alternatively, you can also drag the icon and drop it on the edit 
  7049. control to display its associated REXX code. If desired, the Copy to clipboard 
  7050. menu option can be used to copy the code to the system clipboard. 
  7051.  
  7052. Once an icon has been expanded, it can be collapsed again by clicking the minus 
  7053. sign to the left of the icon. 
  7054.  
  7055.  
  7056. ΓòÉΓòÉΓòÉ 12.5.3. RexxUse tool ΓòÉΓòÉΓòÉ
  7057.  
  7058. The RexxUse tool defines as global procedures any REXX library routines 
  7059. referenced by the current set of dialogs being edited. It searches through your 
  7060. application's REXX code looking for procedure references of the form: CALL 
  7061. _procedure_ or _function_(...), and if _procedure_ or _function_ is defined in 
  7062. the REXX library, it copies the definition from the library into the 
  7063. application as a global procedure. 
  7064.  
  7065. REXX library references within already included REXX library routines are also 
  7066. resolved automatically. In addition, if a previously included REXX library 
  7067. routine is no longer referenced by the application, its global procedure will 
  7068. be deleted from the application. 
  7069.  
  7070. Note:  Procedures may be entered into the REXX library using the RexxLib tool. 
  7071.  
  7072.  
  7073. ΓòÉΓòÉΓòÉ 12.5.4. RexxLib tool ΓòÉΓòÉΓòÉ
  7074.  
  7075. The RexxLib tool allows you to update and browse the contents of the REXX 
  7076. library. The REXX library is a collection of generally useful REXX functions 
  7077. and procedures that can easily be included into any application using the 
  7078. RexxUse tool. 
  7079.  
  7080. The RexxLib tool can be invoked in one of two ways: 
  7081.  
  7082. o From the DrsAide tool by clicking the button. When invoked this way, RexxLib 
  7083.   allows you to browse through the names and definitions of all current REXX 
  7084.   library entries. A list of all current library entries appears on the left 
  7085.   side of the dialog. Double-clicking an entry displays its definition on the 
  7086.   right. The bottom of the dialog also displays information about the origins 
  7087.   of the routine. Clicking the Copy to clipboard button copies the current 
  7088.   definition to the system clipboard. 
  7089. o From the Workplace Shell. Dragging and dropping a file containing REXX 
  7090.   procedures onto the RexxLib icon in the DrDialog folder adds or updates the 
  7091.   REXX procedures contained in the file to the REXX library. For each procedure 
  7092.   in the file, one of the following actions occurs: 
  7093.  
  7094.    - If the procedure is not already in the REXX library, it is added to the 
  7095.      library. 
  7096.    - If the procedure is already in the library, and was originally from the 
  7097.      same file, its definition is updated. 
  7098.    - If the procedure is already in the library, and was originally from a 
  7099.      different file, its definition is not updated. A warning message is 
  7100.      displayed indicating that the procedure is already defined by another 
  7101.      file. Double-clicking on the warning message will override the warning and 
  7102.      replace the previous definition of the procedure with the new one. 
  7103.  
  7104.   In addition, if the REXX library contains procedures previously defined by 
  7105.   the file, but which are no longer contained in the file, those definitions 
  7106.   are deleted from the library. 
  7107.  
  7108.   The file containing REXX procedures should have the following format: 
  7109.  
  7110.        [discarded header information]
  7111.        _label1_: [REXX statements]
  7112.        [more REXX statements]
  7113.        _label2_: [ REXX statements]
  7114.        [more REXX statements]
  7115.        ...
  7116.        _labeln_: [ REXX statements]
  7117.        [more REXX statements]
  7118.  
  7119.   In order to be recognized as a REXX library procedure, the label defining the 
  7120.   start of a procedure must begin and end with underscores (i.e. '_'). The 
  7121.   label is used as the name of the entry in the REXX library. The definition of 
  7122.   the entry consists of all following REXX statements until the next label 
  7123.   beginning and ending with underscores, or the end of the file, is 
  7124.   encountered. Other labels not meeting the above criteria are simply included 
  7125.   as part of the definition of the last label that does. 
  7126.  
  7127.  
  7128. ΓòÉΓòÉΓòÉ 12.5.5. BMPList tool ΓòÉΓòÉΓòÉ
  7129.  
  7130. The BMPList tool allows you to browse collections of .BMP and .GIF files. A 
  7131. radio button allows you to select which type of file you are currently 
  7132. interested in. To select a group of files for browsing, enter the path name of 
  7133. their directory into the entry field, then press Enter or click the button. The 
  7134. list box will display the names of all selected files in the specified 
  7135. directory. To view a particular file, simply select its name from the list box. 
  7136. If the currently selected control is an ICONBUTTON or BILLBOARD, the image 
  7137. selected will also appear in the control. 
  7138.  
  7139. To temporarilly save a copy of a particular image, click the button and a new 
  7140. dialog containing a copy of the image will be created. 
  7141.  
  7142. Each image dialog also has controls to allow the current image to be viewed: 
  7143.  
  7144. o Centered within the display area 
  7145. o Scaled to fill the entire display area 
  7146. o Replicated to fill the entire display area 
  7147.  
  7148.  
  7149. ΓòÉΓòÉΓòÉ 12.6. Writing your own DrsAide tool ΓòÉΓòÉΓòÉ
  7150.  
  7151. There are basically three parts to writing a DrsAide tool: 
  7152.  
  7153. o Creating the tool 
  7154. o Integrating the tool into DrDialog 
  7155. o Creating a bitmap for the tool's DrsAide icon button 
  7156.  
  7157. The first part, creating the tool, is usually accomplished using various 
  7158. subcommands of the DrDialog function to examine and modify information within 
  7159. the DrDialog programming environment. Feel free to use any of the DrsAide tools 
  7160. distributed with DrDialog as examples of how to go about doing this. 
  7161.  
  7162. The second part, integrating the tool into DrDialog, can easily be accomplished 
  7163. using several REXX library functions provided with DrDialog: 
  7164.  
  7165. _DrsAideInit_ This function should be called from the Init global procedure of 
  7166.           your tool. Its purpose is to initialize the link to DrDialog via the 
  7167.           DrDialog function and to open the first dialog of your tool if it was 
  7168.           invoked via DrsAide. Its usage is: 
  7169.  
  7170.                        rc = _DrsAideInit_( hwnd, iniFile [, dialog] [, bitmap] )
  7171.  
  7172.           where hwnd and iniFile are the first two command line arguments 
  7173.           passed to the tool by DrsAide, dialog is the optional name of the 
  7174.           dialog to open (it defaults to the first dialog in the application), 
  7175.           and bitmap is the name of the bitmap to display on the DrsAide icon 
  7176.           button for your tool (specified only if your tool does not have a 
  7177.           .BMP file with the same name as the tool's .RES file). 
  7178.  
  7179.           The function returns 1 if the tool was invoked from DrsAide, and 0 
  7180.           otherwise. If 0 is returned, you may wish to initialize the tool 
  7181.           differently, or display an error message. 
  7182.  
  7183.           For example: 
  7184.  
  7185.                        PARSE ARG hwnd iniFile rest
  7186.                        IF _DrsAideInit( hwnd ) = 0 THEN EXIT
  7187.  
  7188. _DrsAideDialogInit_ This routine should be called from the Init event handler 
  7189.           of each dialog opened by your tool (unless the dialog is owned by 
  7190.           another dialog in your tool). It registers the dialog with DrDialog 
  7191.           and attempts to restore the last saved size and position of the 
  7192.           dialog. 
  7193.  
  7194.           Note:  This procedure also shows the dialog. It is a good idea to 
  7195.           create the dialog with the Visible attribute of the dialog off in 
  7196.           order to allow the _DrsAideDialogInit procedure to size and position 
  7197.           the dialog correctly before displaying it. 
  7198.  
  7199.           Its usage is: 
  7200.  
  7201.                        CALL _DrsAideDialogInit_ hwnd, iniFile
  7202.  
  7203.           where hwnd and iniFile are the first two command line arguments 
  7204.           passed to the tool by DrsAide. 
  7205.  
  7206.           For example: 
  7207.  
  7208.                        ...in Init global procedure ...
  7209.                        PARSE ARG hwnd iniFile rest
  7210.                        ...
  7211.                        ... in dialog Init event handler ...
  7212.                        CALL _DrsAideDialogInit_ hwnd, iniFile
  7213.  
  7214. _DrsAideDialogExit_ This routine should be called from the Exit event handler 
  7215.           of each dialog opened by your tool whose Init handler calls 
  7216.           _DrsAideDialogInit_. It saves the size and position of the dialog in 
  7217.           the DrsAide .INI file so that its location can be restored by the 
  7218.           _DrsAideDialogInit_ procedure the next time the tool is invoked. Its 
  7219.           usage is: 
  7220.  
  7221.                        CALL _DrsAideDialogExit_ hwnd, iniFile
  7222.  
  7223.           where hwnd and iniFile are the first two command line arguments 
  7224.           passed to your tool by DrsAide. 
  7225.  
  7226.           For example: 
  7227.  
  7228.                        ...in Init global procedure ...
  7229.                        PARSE ARG hwnd iniFile rest
  7230.                        ...
  7231.                        ... in dialog Exit event handler ...
  7232.                        CALL _DrsAideDialogExit_ hwnd, iniFile
  7233.  
  7234. The source for each of the above routines is contained in the DrsAide.RXL file 
  7235. in the DrDialog folder. To add these routines to your REXX library, drag and 
  7236. drop the DrsAide.RXL file icon onto the RexxLib icon, also in the DrDialog 
  7237. folder. Once you have done this, you may obtain more detailed information by 
  7238. browsing their source using the RexxLib tool. 
  7239.  
  7240. Also, once installed into your REXX library, you may incorporate these routines 
  7241. into a tool by first writing the code invoking them and then using the RexxUse 
  7242. tool to automatically include the correct procedures into your application. 
  7243.  
  7244. Alternatively, you can use the DrsAideT.RES template in the DrDialog directory 
  7245. to quickly create a template for a new DrsAide tool. Drag and drop the 
  7246. DrsAideT.RES icon into a folder to create a new .RES file which has the 
  7247. appropriate calls to the routines just described already installed. Once the 
  7248. new .RES file is created, you can: 
  7249.  
  7250. o Rename the tool by clicking on its icon label with the Alt key pressed and 
  7251.   then typing in the name of the tool you are creating. 
  7252. o Install the tool into DrsAide by dragging and dropping the new .RES file's 
  7253.   icon onto the DrsAide icon in the DrDialog folder. By default, the new tool 
  7254.   will use a standard icon in the DrsAide tool bar. If you wish, you can create 
  7255.   a new .BMP file with the same name prior to installing the .RES file into 
  7256.   DrsAide, or you can change the default icon later by double-clicking the 
  7257.   DrsAide icon to edit the tool's bitmap name directly. 
  7258. o Define the tool by dragging and dropping the new .RES file's icon onto the 
  7259.   DrDialog icon in the DrDialog folder. Once the editor is invoked, you may add 
  7260.   the necessary controls and REXX code to complete your application. Once the 
  7261.   tool has been saved, you can test it simply by clicking on its icon button in 
  7262.   the DrsAide tool bar. 
  7263.  
  7264. The final part, creating a bitmap for the tool's DrsAide icon button, can be 
  7265. done using any bitmap editor (e.g. ICONEDIT.EXE). The resulting bitmap should 
  7266. be given the same name as your tool's .RES file. This will allow DrsAide to 
  7267. locate the bitmap when a user installs your tool. 
  7268.  
  7269. Alternatively, if you wish to use a bitmap stored in a .DLL (e.g. BITMAP.DLL), 
  7270. you can supply the name of the bitmap in the call to the _DrsAideInit_ 
  7271. function. When the user installs your tool and DrsAide is not able to find a 
  7272. corresponding .BMP file, it will invoke your tool with a special command line 
  7273. argument which indicates that your tool must install itself. If you call 
  7274. _DrsAideInit_ in your global Init procedure and pass it the name of the bitmap 
  7275. to use, it will automatically handle this special case and install your 
  7276. application correctly. 
  7277.  
  7278. And finally, each tool invoked by DrsAide is passed as its second command line 
  7279. argument the name of an .INI file the tool can use to save information in. 
  7280. Information can saved and restored in the .INI file using the REXX SysIni 
  7281. function. The REXX library _DrsAideIniApp_ function can also be used to 
  7282. generate application keys of the form: resFile:dialog (e.g. Calc:calc). These 
  7283. can be used with the SysIni function to ensure that each DrsAide tool uses 
  7284. unique application keys for its data. The usage for _DrsAideIniApp_ is: 
  7285.  
  7286.    key = _DrsAideIniApp_()
  7287.  
  7288. Note that this function will generate a unique application key for each tool 
  7289. dialog it is used from. 
  7290.  
  7291. For example, a DrsAide tool that does special initialization the first time it 
  7292. is invoked might use the following code: 
  7293.  
  7294.    PARSE hwnd iniFile rest
  7295.    ...
  7296.    /* Dialog 'Init' event handler: */
  7297.    IF SysIni( iniFile, _DrsAideIniApp_(), 'Inited' ) = 'ERROR:' THEN DO
  7298.       CALL SysIni iniFile, _DrsAideIniApp_(), 'Inited', 1
  7299.       /* One time initialization code goes here... */
  7300.       ...
  7301.       END
  7302.    ...
  7303.  
  7304.  
  7305. ΓòÉΓòÉΓòÉ 13. Utilities ΓòÉΓòÉΓòÉ
  7306.  
  7307. The DrDialog package includes four utilities that help create and maintain 
  7308. DrDialog and DrRexx applications: 
  7309.  
  7310. BMPTODLL      Create a .DLL from one or more .BMP, .ICO or .PTR files. 
  7311.  
  7312. REStoRXX      Create a source listing of the REXX code associated with a DrRexx 
  7313.               .RES file. 
  7314.  
  7315. REView        Display a DrRexx .RES file in the form of an outline 
  7316.  
  7317. REVise        Allows sections of a DrRexx .RES file to be cut and pasted using 
  7318.               drag and drop operations. 
  7319.  
  7320.  
  7321. ΓòÉΓòÉΓòÉ 13.1. BMPtoDLL ΓòÉΓòÉΓòÉ
  7322.  
  7323. The BMPtoDLL utility creates a .DLL from one or more .BMP, .ICO or .PTR files. 
  7324. This utility is useful in conjunction with DrDialog ICONBUTTON and BILLBOARD 
  7325. controls, which can display bitmaps stored in a .DLL. 
  7326.  
  7327. The syntax for invoking BMPtoDLL is: 
  7328.  
  7329.    BMPtoDLL dllName [file1 file2 ... filen]
  7330.  
  7331. where dllName is the name of the .DLL to create (the .DLL extension is 
  7332. optional). File1 through filen are the names of the .BMP, .ICO or .PTR files to 
  7333. include in the .DLL. Wildcard characters (i.e. "*" or "?") may be used in the 
  7334. file names. If not specified, file1 defaults to "*.BMP". 
  7335.  
  7336. Note:  The BMPtoDLL command uses a data file called BMPtoDLL.DAT, which must be 
  7337. present either in your PATH or DPATH. If it cannot be found, an error message 
  7338. will be displayed and no .DLL file will be created. 
  7339.  
  7340.  
  7341. ΓòÉΓòÉΓòÉ 13.2. REStoRXX ΓòÉΓòÉΓòÉ
  7342.  
  7343. The REStoRXX utility creates a source file listing of the REXX code associated 
  7344. with a DrRexx .RES file. To use REStoRXX, drop any DrRexx .RES file onto the 
  7345. REStoRXX icon in the DrDialog folder. REStoRXX will create a file with the same 
  7346. name, but with a .RXX extension, containing a listing of the REXX source code 
  7347. associated with the .RES file. 
  7348.  
  7349. Note:  The .RXX source file created by REStoRXX is very similar to the REXX 
  7350. program created by DrDialog when your DrRexx application runs, but it is not 
  7351. identical. The source listing is intended mainly as documentation for your 
  7352. DrRexx application. At present, there is no way for the .RXX file to be 
  7353. directly imported back into DrDialog. 
  7354.  
  7355.  
  7356. ΓòÉΓòÉΓòÉ 13.3. REView ΓòÉΓòÉΓòÉ
  7357.  
  7358. The REView utility displays a DrRexx .RES file in the form of an outline. At 
  7359. the top level of the outline are dialogs and globals procedures. At the level 
  7360. below a dialog are the dialog's controls and drop down menu. At the level below 
  7361. a control are its event handlers, and so on. The outline may be expanded or 
  7362. collapsed to display more or less detail about the structure of the 
  7363. application. 
  7364.  
  7365. To invoke REView from the Workplace Shell, drop any DrRexx .RES file onto the 
  7366. REView icon in the DrDialog folder. 
  7367.  
  7368. For more information about how to use REView once it has been invoked, refer to 
  7369. the REView tool section in the DrsAide portion of this document. 
  7370.  
  7371.  
  7372. ΓòÉΓòÉΓòÉ 13.4. REVise ΓòÉΓòÉΓòÉ
  7373.  
  7374. The REVise utility provides a simple, graphical means of copying dialogs and 
  7375. REXX code from one DrRexx application to another. 
  7376.  
  7377. REVise works by displaying a DrRexx .RES file in the form of an outline. At the 
  7378. top level of the outline is the .RES file itself. At the level below that are 
  7379. sections for dialogs, globals procedures and any external code contained in the 
  7380. file. And finally, at the level below that are the individual dialogs and 
  7381. global procedures contained within the file. Levels within the hierarchy can be 
  7382. expanded or collapsed as desired. Each icon within the hierarchy can also be 
  7383. dragged and dropped on either the Add or Delete icons located at the bottom of 
  7384. the dialog, either in the same dialog, or in the case of the Add icon, in any 
  7385. other instance of the REVise utility currently running. 
  7386.  
  7387. Dropping an object on the Add icon adds an identical copy of the specified 
  7388. object to the corresponding .RES file. If any names or IDs within the object 
  7389. being copied conflict with names or IDs already in the target .RES file, the 
  7390. REVise utility will automatically rename or renumber the objects as needed to 
  7391. avoid conflicts. Messages indicating the changes made will be displayed in a 
  7392. pop-up message log window. Note that copying a dialog also copies any REXX 
  7393. event handlers associated with the dialog. 
  7394.  
  7395. Dropping an object on the Delete icon removes the specified object from the 
  7396. .RES file. Note that objects can only be deleted from the .RES file they are 
  7397. contained in. 
  7398.  
  7399. No changes are actually made to the .RES file until you close the dialog. At 
  7400. that time, if any changes have been made, you will be asked whether you wish to 
  7401. save or discard the changes. 
  7402.  
  7403. To invoke REVise from the Workplace Shell, drop any DrRexx .RES file onto the 
  7404. REVise icon in the DrDialog folder. 
  7405.  
  7406.  
  7407. ΓòÉΓòÉΓòÉ 14. User preferences ΓòÉΓòÉΓòÉ
  7408.  
  7409. DrDialog keeps track of a number of user preference items in the DRDIALOG.INI 
  7410. file. 
  7411.  
  7412. The user preference items are: 
  7413.  
  7414. o The last position, size and pattern for the background window 
  7415. o The last position and size of each tool window 
  7416. o The Auto open, Auto hide, and Float settings of each tool window 
  7417. o The last set of ID tool options used 
  7418. o The last selected size tool unit (pels or dialog units) 
  7419. o The name of the last dialog file saved or loaded 
  7420. o The dialog file save options last used 
  7421. o The last application switched to using the <- Switch button 
  7422. o The last font and color set for both the DrRexx event and drop-down menu 
  7423.   action multi-line edit controls. Note that the font can be set by dragging 
  7424.   and dropping a Workplace Shell Font Palette object onto either mult-line edit 
  7425.   control. The color can be set by dragging and dropping a Workplace Shell 
  7426.   Color Palette object onto either mult-line edit control. 
  7427.  
  7428. These preference items are used the next time the editor is run to restore the 
  7429. editing environment to its previous state as much as possible. 
  7430.  
  7431.  
  7432. ΓòÉΓòÉΓòÉ 15. Acknowledgements ΓòÉΓòÉΓòÉ
  7433.  
  7434. DrDialog was written by: 
  7435.  
  7436.         David C. Morrill
  7437.         IBM T. J. Watson Research Center
  7438.  
  7439.         topview@watson.ibm.com
  7440.  
  7441. DrDialog is an object-oriented program completely written in Oberon-2 using the 
  7442. HOPE Oberon programming environment, also written by David C. Morrill. 
  7443.  
  7444. Screen capture for this document was done using BMP, another Oberon program 
  7445. developed by David C. Morrill using HOPE. 
  7446.  
  7447.  
  7448. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7449.  
  7450. Clicking the Replace button updates the selected menu item with the current 
  7451. values of the Text, Label, Action, Checked and Disabled fields. 
  7452.  
  7453.  
  7454. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7455.  
  7456. Clicking the Cancel button restores the Text, Label, Action, Checked and 
  7457. Disabled fields to their last saved state. 
  7458.  
  7459.  
  7460. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7461.  
  7462. Clicking the Delete button deletes the currently selected menu item. 
  7463.  
  7464.  
  7465. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7466.  
  7467. Clicking the Menu Item button inserts a new menu item after the currently 
  7468. selected menu item. The contents of the Text, Label, Action, Checked, and 
  7469. Disabled fields are used to define the new menu item. 
  7470.  
  7471. If the action field is empty, the menu item is a static menu item. 
  7472.  
  7473.  
  7474. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7475.  
  7476. Clicking the Submenu button inserts a new submenu after the currently selected 
  7477. menu item. The new submenu initially has no menu items. The contents of the 
  7478. Text, Label, Checked and Disabled fields are used to defined the new submenu 
  7479. item. 
  7480.  
  7481.  
  7482. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7483.  
  7484. Clicking the Separator button inserts a new separator after the currently 
  7485. selected menu item. The contents of the Text, Label, Action, Checked and 
  7486. Disabled fields are ignored. 
  7487.  
  7488.  
  7489. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7490.  
  7491. The state of the Checked field is used to set the check status of a menu item 
  7492. when the Replace, Menu Item, or Submenu buttons are clicked. 
  7493.  
  7494.  
  7495. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7496.  
  7497. The state of the Disabled field is used to set the disabled status of a menu 
  7498. item when the Replace, Menu Item, or Submenu buttons are clicked. 
  7499.  
  7500.  
  7501. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7502.  
  7503. The contents of the Text field are used to set the text of a menu item when the 
  7504. Replace, Menu Item, or Submenu buttons are clicked. 
  7505.  
  7506.  
  7507. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7508.  
  7509. The contents of the Label field are used to set the label of a menu item when 
  7510. the Replace, Menu Item, or Submenu buttons are clicked. 
  7511.  
  7512.  
  7513. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7514.  
  7515. The contents of the Action field are used to define the REXX code associated 
  7516. with a menu item when the Replace or Menu Item buttons are clicked. 
  7517.  
  7518.  
  7519. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7520.  
  7521. The menu bar shows what the drop-down menu being edited will look like when the 
  7522. application is running. Selecting an item from the menu will also select the 
  7523. corresponding menu item for editing. 
  7524.  
  7525.  
  7526. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7527.  
  7528. The left-most listbox shows the menu items currently defined for the menu bar. 
  7529. Selecting an entry from the list selects the corresponding menu item for 
  7530. editing or insertion. 
  7531.  
  7532.  
  7533. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7534.  
  7535. The middle listbox shows the menu items currently defined for the submenu 
  7536. selected in the left-most listbox. Selecting an entry from the list selects the 
  7537. corresponding menu item for editing or insertion. 
  7538.  
  7539.  
  7540. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7541.  
  7542. The right-most listbox shows the menu items currently defined for the submenu 
  7543. selected in the middle listbox. Selecting an entry from the list selects the 
  7544. corresponding menu item for editing or insertion. 
  7545.  
  7546.  
  7547. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7548.  
  7549. Clicking the stop button terminates execution of the DrRexx application. 
  7550.  
  7551. If running in the stand-alone DrRexx environment, the entire application is 
  7552. terminated. 
  7553.  
  7554. If running under control of the DrDialog editor, all application dialogs are 
  7555. closed and control returns to the editor. Run mode is ended and edit mode 
  7556. resumes. The  button replaces the  button. You may click the run button to 
  7557. start the DrRexx application again. 
  7558.  
  7559. Note:  While in edit mode, all DrRexx run-time controls (other than the run 
  7560. button) are disabled. 
  7561.  
  7562.  
  7563. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7564.  
  7565. Clicking the break button interrupts the currently executing REXX code (if any) 
  7566. and forces the run-time environment to wait for the next input event. 
  7567.  
  7568. If REXX code was being executed, an error message indicating what code was 
  7569. executing will be displayed in the output list control. 
  7570.  
  7571.  
  7572. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7573.  
  7574. Clicking the clear button clears the contents of the output list control. 
  7575.  
  7576.  
  7577. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7578.  
  7579. Clicking the evaluate button causes the contents of the entry field to its 
  7580. right to be interpreted as a REXX statement. This can be useful for displaying 
  7581. or modifying information about the state of the currently running DrRexx 
  7582. application. 
  7583.  
  7584. Note:  If interactive debug mode is active, the  button may be replaced by the 
  7585. button. This indicates that the contents of the entry field to the right of the 
  7586. button will be used to control the REXX interactive trace. It also indicates 
  7587. that the REXX code is suspended in trace mode, and is not ready to process the 
  7588. next input event. The reappearance of the evaluate button indicates that the 
  7589. DrRexx application is waiting for the next event. 
  7590.  
  7591.  
  7592. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7593.  
  7594. Clicking the trace button toggles between REXX trace and interactive debug 
  7595. modes. The current mode is indicated by the appearance of the trace button. The 
  7596. button indicates trace mode, while the  button indicates interactive debug 
  7597. mode. 
  7598.  
  7599. In trace mode, REXX trace messages appear in the output list control, but the 
  7600. program does not stop. 
  7601.  
  7602. In interactive debug mode, REXX trace messages appear in the output list 
  7603. control, and execution stops after every trace event. Clicking the  button 
  7604. allows the contents of the entry field to its right to control REXX interactive 
  7605. debug mode. 
  7606.  
  7607. Note:  The trace button does not turn REXX trace mode on or off, but only 
  7608. indicates whether the trace should be interactive or not. The drop down list to 
  7609. its right can be used to set the current trace mode. 
  7610.  
  7611.  
  7612. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7613.  
  7614. Selecting an item from the trace mode list determines the current REXX trace 
  7615. mode in effect. See the Procedures Language/2 REXX Reference for a detailed 
  7616. explanation of the various REXX trace modes. 
  7617.  
  7618. The  button can be used in conjunction with the setting of this control to 
  7619. select whether tracing should be interactive or not. 
  7620.  
  7621.  
  7622. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7623.  
  7624. Clicking the variables control displays the current value of all REXX variables 
  7625. for the DrRexx application in the control's drop down list. 
  7626.  
  7627. Selecting an item in the list will copy a statement of the form SAY "var =" var 
  7628. to the entry field to allow for easy monitoring of the selected variable using 
  7629. the  button. 
  7630.  
  7631.  
  7632. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7633.  
  7634. The current contents of the interpret field can be evaluated as a REXX 
  7635. statement by clicking on the  button to its left or by pressing the Enter key. 
  7636.  
  7637. Note:  In interactive debug mode, the evaluate button is replaced by the 
  7638. button. The contents of the interpret field are then used to control 
  7639. interactive debug mode when the debug button is clicked. 
  7640.  
  7641.  
  7642. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7643.  
  7644. The contents of the output list shows the results of REXX SAY statements or 
  7645. program trace messages. Only the last 100 messages issued are displayed. 
  7646.  
  7647. Selecting an entry in the list copies it to the interpret entry field above it 
  7648. (unless the selected item is of the form var = value, in which case SAY "var = 
  7649. " var is copied to the interpret field. 
  7650.  
  7651.  
  7652. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7653.  
  7654. Clicking the undo button restores the edit control to the last saved value of 
  7655. the text (or the original value if it has not yet been saved). 
  7656.  
  7657. The text can be saved by clicking on the button located just above the undo 
  7658. button. 
  7659.  
  7660.  
  7661. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7662.  
  7663. Clicking the save button saves the current contents of the edit control. If you 
  7664. later make some changes to the text that you wish to discard, you can restore 
  7665. the text back to the last saved value by clicking the button located just below 
  7666. the save button.. 
  7667.  
  7668.  
  7669. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7670.  
  7671. Clicking the paste button replaces the currently selected text with the 
  7672. contents of the system clipboard. 
  7673.  
  7674.  
  7675. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7676.  
  7677. Clicking the copy button copies the currently selected text into the system 
  7678. clipboard. 
  7679.  
  7680.  
  7681. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7682.  
  7683. Clicking the cut button deletes the currently selected text and copies it into 
  7684. the system clipboard. 
  7685.  
  7686.  
  7687. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7688.  
  7689. Clicking the find button searches the edit control for the next occurrence of 
  7690. the text string currently in the search field next to the find button. The 
  7691. search always begins at the current cursor position. 
  7692.  
  7693.  
  7694. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7695.  
  7696. Clicking the switch button causes the application whose OS/2 Presentation 
  7697. Manager Window List entry starts with the contents of the search field to be 
  7698. brought to the foreground. 
  7699.  
  7700.  
  7701. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7702.  
  7703. Enter the text to search for into the search field, then click the Find button 
  7704. to search for the text in the edit control. The search always begins at the 
  7705. current cursor location. 
  7706.  
  7707.  
  7708. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7709.  
  7710. Selecting an item in the spin button control selects the type of text to be 
  7711. displayed in the edit control: 
  7712.  
  7713. Control   The control specific REXX code 
  7714. Class     The generic class REXX code 
  7715. Events    The set of events defined for the control 
  7716. Functions The set of window functions defined for the control 
  7717.  
  7718.  
  7719. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7720.  
  7721. Clicking the notepad page tab will select the DrRexx notepad section, which 
  7722. allows you to enter and edit REXX code fragments or other useful pieces of 
  7723. information that will be available in every DrDialog editing session. 
  7724.  
  7725.  
  7726. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7727.  
  7728. Clicking the global procedures page tab will select the global procedures 
  7729. section, which allows you to enter and edit REXX procedures callable from other 
  7730. parts of your DrRexx application. 
  7731.  
  7732.  
  7733. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7734.  
  7735. Clicking the events page tab will select the events section, which allows you 
  7736. to enter and edit REXX event handling code associated with the currently active 
  7737. control. 
  7738.  
  7739.  
  7740. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7741.  
  7742. The edit control allows you to enter and edit REXX code. It is a standard 
  7743. Presentation Manager multi-line edit control, and it uses the same font as the 
  7744. System Editor. 
  7745.  
  7746.  
  7747. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7748.  
  7749. The status line displays the name, ID, and type of the currently active 
  7750. control. 
  7751.  
  7752.  
  7753. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7754.  
  7755. Clicking an event page tab selects the code associated with the event whose 
  7756. name appears on the tab into the edit control for editing. 
  7757.  
  7758.  
  7759. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7760.  
  7761. Clicking a global procedure page tab selects the code associated with the 
  7762. procedure whose name appears on the tab into the edit control for editing. 
  7763.  
  7764.  
  7765. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7766.  
  7767. All currently defined global procedures are displayed alphabetically in this 
  7768. list. Double-clicking an entry in the list will select the page containing the 
  7769. code associated with the selected procedure. 
  7770.  
  7771.  
  7772. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7773.  
  7774. Enter the name of a global procedure into this entry field and press Enter to 
  7775. edit it. If the name is new, a blank notebook page will be created with the 
  7776. name of the procedure on its page tab. 
  7777.  
  7778.  
  7779. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7780.  
  7781. Clicking a notepage page tab selects the text associated with the note whose 
  7782. name appears on the tab into the edit control for editing. 
  7783.  
  7784.  
  7785. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7786.  
  7787. All currently defined notes are displayed alphabetically in this list. 
  7788. Double-clicking an entry in the list will select the page containing the text 
  7789. associated with the selected note. 
  7790.  
  7791.  
  7792. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  7793.  
  7794. Enter the name of a note into this entry field and press Enter to edit it. If 
  7795. the name is new, a blank notebook page will be created with the name of the 
  7796. note on its page tab.