HELP RC_CONTROL_PANEL Aaron Sloman, July 1997 With help from Brian Logan Updated 19 Sep 2002 See HELP * RCLIB_NEWS regarding updates (and the end of this file.) ======================================================================= NB Sept 2002 Added new facilities for accessing and updating contens of fields in a panel. See these items, described in HELP RCLIB: rc_panelcontents( ) -> result; rc_panel_field_value( ) -> val val -> rc_panel_field_value( ) See TEACH NEWTEST.P Changes made to event handling in LIB rc_mousepic mean that The three categories of action button types POPNOW, POP11 and INVED are all now collapsed into one: POP11 actions. Changes to the event handler have made the distinctions unnecessary. However DEFER actions remain a distinct category. July 2002 Made it possible to change the 'drawable' size of a panel using the mouse. Previously the size of the window on the screen would change, but only the old area was accessible to programs. Now a control panel will adjust its drawable area if it set resizable. This is done using the new panel specification option: {resize true} See also HELP RCLIB_NEWS LIB rc_control_panel/'Revision History' Added new facilities for programs to interrogate or set values of RADIO or SOMEOF buttons on a panel. rc_panelcontents( ) -> result; rc_panel_field_value( ) -> val val -> rc_panel_field_value( ) rc_set_radio_buttons rc_set_someof_buttons All described in HELP RCLIB ======================================================================= LIB * RC_CONTROL_PANEL This library provides automatically created and assembled control panels based on the object oriented Pop-11 graphical package RCLIB. USAGE: uses rclib uses rc_control_panel rc_control_panel(x, y, field_specs, title) -> panel; Optional extra arguments: container, or window creation procedure x, y: Integers, (or words specifying location) field_specs: A list of field panel and field descriptions title: A string The words "left", "middle","right" can be used for x, and "top", "middle" "bottom" for y, and negative integers can be used for x and y, to indicate measurements from right and bottom of screen. Negative integers cannot be used for location of a contained panel, since rc_graphic coordinates inside a window can be negative. For tutorial examples see below and: TEACH RC_CONTROL_PANEL, TEACH POPCONTROL, TEACH RC_ASYNC_DEMO, TEACH RC_CONSTRAINED_PANEL, TEACH RCLIB_DEMO.P Those teach files illustrate only a subset of the facilities. If the sim_agent toolkit is available, another tutorial example is in: TEACH SIM_FEELINGS For warnings regarding compatibility with RCLIB features and the original RC_GRAPHIC facilities, see HELP RCLIB_COMPATIBILITY CONTENTS -- Introduction -- The philosophy of rc_control_panel -- How rc_control_panel works -- Applications of rc_control_panel -- The class rc_panel -- Rc_control_panel and Propsheet -- Other facilities -- Using rc_control_panel -- Simple examples -- -- demo_panel1 -- -- demo_panel2 -- -- Putting one panel inside another: blue_panel -- -- Making a sub-panel draggable -- -- Another sub-panel: demo_panel3 -- -- A simple coloured panel: rc_coloured_panel -- -- Two panels side by side: left_panel, right_panel -- -- demo_panel4: adding panel properties -- -- demo_panel5: more properties, and field alignment -- -- demo_panel6: using field labels and accessing field values -- -- . Checking the values of associated variables -- -- . Program commands to access or set field values -- -- -- Getting and setting the value of a slider on the panel -- -- -- Getting and setting the value in a RADIO field -- -- Getting from a button to the panel field or containing window -- -- -- Getting and setting the values in a SOMEOF field -- More detailed overview -- The field specification list -- global variables rc_current_panel, rc_current_panel_field -- The types of fields recognised by rc_control_panel -- Using featurespecs to change defaults -- Format of field_specs list -- -- Format of specifications (optional) -- -- . Minimal width or height of panel -- -- . Default panel font -- -- . Default background and foreground panel colours -- -- . xorigin yorigin xscale yscale -- -- . offset -- -- . Panel event types -- -- . dragonly event type -- -- . resize -- -- . Using rc_event_types to check event types of a panel -- -- . Other formats -- -- Format of list -- -- . (Specifying type of field) -- -- .