HELP RCLIB_NEWS Aaron Sloman, Feb 2004 Changes to the RCLIB package are listed below in reverse chronological order. See also HELP * RCLIB MOST RECENT MAJOR CHANGE (2002): Major changes to event handling (should be transparent) Several extensions to rc_control_panel to make it easier to design programs that build and access components. Extensions and fixes to rc_scrolltext The latest version of this file is normally accessible as http://www.cs.bham.ac.uk/research/poplog/rclib/help/rclib_news or ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rclib/help/rclib_news Examining that will enable remote users to decide whether to fetch the latest version of the whole rclib package, accessible as: http://www.cs.bham.ac.uk/research/poplog/rclib.tar.gz or ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rclib.tar.gz Many LIB files have Revision notes at the end giving more details regarding some of the changes. CONTENTS -- 2006 -- 29 Mar 2006 -- 2005 -- 31 Dec 2005 -- 2004 -- 19 Feb 2004 -- 6 Jan 2004 Rectifying omissions in this news file -- -- rc_panelcontents( ) -> result; -- -- rc_panel_field_value -- -- rc_real_contents -- 2003 -- 20 Jul 2003 print_to_strings -- 2002 -- 19 Sep 2002 popmemlim increased -- 19 Sep 2002 New facilities for accessing and updating panel fields -- 19 Sep 2002 rc_control_panel -- 16 Sep 2002 ved_read_from_file -- 16 Sep 2002 Printing rationalised -- 16 Sep 2002 ved_read_from_file -- 14 Sep 2002 rc_handle_vedwarpcontext -- 12 Sep 2002 Much documentation updated -- 12 Sep 2002 rc_handle_event and rc_really_handle_event -- 12 Sep 2002 rc_consolidate_all_input(panel:rc_panel); -- 6 Sep 2002 compilation modes relaxed -- 6 Sep 2002 rc_kill_window_object -- 26 Aug 2002 Extensions to LIB rc_scrolltext -- 25 Aug 2002 replaced "rc_informant_contents" with "rc_informant_value" -- 25 Aug 2002 Extended keycode mappings in LIB rc_interpret_key -- 13 Aug 2002 Changed some printing formats -- 13 Aug added rc_undefined for default rc_informant contents -- 8 Aug 2002 More extensions to control_panel facilities -- 8 Aug 2002 Changed compile mode for many libraries -- 4 Aug 2002 Extensions to control_panel facilities -- 2 Aug 2002 LIB interpret_specs extended with abbreviations -- 2 Aug 2002 rc_informant_label -- 31 Jul 2002 Documentation files improved -- 28 Jul 2002 New default isrc_panel_field -- 28 Jul 2002 New checking procedure rc_check_window_object(); -- 27 Jul 2002 Facilities for handling resize events on window objects -- -- Changes to LIB RC_WINDOW_OBJECT -- -- Extensions to LIB RC_MOUSEPIC to support resize event handling -- 27 Jul 2002 rc_redraw_this_panel(); -- 23 Jul 2002 new auto-loadable procedure rc_run_deferred_events -- 23 Jul 2002 Extended TEACH RC_ASYNC_DEMO -- 19 Jul 2002 Fixed some documentation in HELP RCLIB, RC_BUTTONS -- 19 Jul 2002 Extended rc_mousepic event handling -- 2001 -- 19 Mar 2001 Fixed rc_draw_arc_segment -- 19 Mar 2001 Fixed rc_informant in XVed -- 18 Mar 2001 DIALS documented and further generalised -- 12 Mar 2001 Introduced rc_draw_rotated_rect.p -- 12 Mar 2001 More work cleaning up the implementation of dials, -- 9 Mar 2001 Improved rc_control_panel for sliders and dials -- 18 Jan 2001 Expanded HELP RCLIB, introduced rc_display_file -- 2000 -- 24 Dec 2000 Added rc_draw_coloured_line -- 19 Dec 2000 New library and teach file rc_sprite -- 5 Dec 2000 Bug fixed in windows with embedded windows. -- 28 Nov 2000 improved rc_pythagoras demo -- 19 Nov 2000 morphing facilities extended to sets of pictures -- 17 Nov 2000 new facilities for morphing sets of lines -- 16 Nov 2000 Bug fix in getpointvec -- 8 Oct 2000 Adjustment for title bar if window location is "bottom" -- 15 Sep 2000 NEW: HELP RC_EVENTS, and some event-handling fixes -- 10 Sep 2000 Tidied event handling further, new HELP file -- 2 Sept rc_add_kill_button -- 14 Sep 2000 Dials allowed in rc_control_panel, but incomplete -- 30 Aug 2000 rc_dial -- 26 Aug 2000 rc_constrained_pointer.p rc_constrained_rotater.p -- 23 Aug 2000 New facilities leading towards decorations on dials -- 20 Aug 2000 -- -- New facilities for interacting through Ved/Xved files -- -- New polygon facilities LIB rc_draw_lines -- -- rc_draw_triangle improved, and used in rc_scrolltext -- -- New keyword "INVED" for button actions -- 3 Aug 2000 New drawing primitives for rectangles and triangles -- 23 Jul 2000 various improvements -- -- Horizontal and vertical slider blob methods -- -- RCMENU improvements -- -- Documentation updates -- -- rc_control_panel extensions and changes -- -- rc_display_strings -- -- rc_browse_files improved -- 21 Jul 2000 More control over fonts, default font sizes reduced -- 10 Jul 2000 Various extensions -- -- HELP rclib revised and extended, with a more -- -- New method rc_set_window_scale -- -- New mixin rc_rotatable_picsonly -- -- New method rc_change_picture -- 6 Jul 2000 New method rc_shift_window_frame_by -- 4 Jul 2000 Improved sliders, scrolltext, rc_control_panel -- -- New library rc_opaque_slider -- -- Improved rc_scrolltext -- -- Improved rc_control_panel -- -- Improved rc_display_strings -- -- Modified rc_neural demo -- 21 Jun 2000 New facilities related to pointers and dials -- -- New class rc_constrained_pointer -- -- rc_rotate_vector rc_rotate_vector(x, y, ang) -> (x, y); -- -- New mixin rc_constrained_rotater -- 21 Jun 2000 rc_ant_demo -- 18 Jun 2000 New facilities to support opaque movers -- -- Modified LIB rc_linepic -- -- Introduced LIB rc_opaque_mover -- -- Modified updater of rc_foreground -- 17 Jun 2000 New drawing procedures: blobs and pointers -- -- rc_draw_blob_sector -- -- rc_draw_semi_circle -- -- rc_draw_scaled_blob -- -- rc_draw_pointer -- 16 Jun 2000 rc_draw_blob -- 16 Jun 2000 LIB rc_buttons improved -- 15 Jun 2000 fixed rc_redraw_window_object -- 14 Jun 2000 Introduced rc_font_dimensions -- 4 Jun 2000 TEACH popcontrol modified -- 8 Mar 2000 HELP RCLIB extended and reorganised -- 7 Mar 2000 Multiple event handlers -- 27 Feb 2000 New Utility rc_screensize -- -- LIB RC_WINDOW_OBJECT now compatible with popvision -- 20 Feb 2000 rc_make_current_window -- -- rc_drawline_relative, rc_drawline_absolute -- -- rc_new_window_object -- 19 Feb 2000 Changes: rc_message, rc_message_wait, rc_foreground -- 27 Dec 1999 new rc_setup_linefunction and colour and font defaults -- 16 Dec 1999 Added rc_get_coords -- 10 October 1999 Compatibility with RC_GRAPHIC teach files. -- -- rc_informant_window -- -- rc_islive_window_object(win) -> boole -- -- SETWINDOW -- 16 Sep 1999 Improvements to LIB * rc_buttons -- -- Formats for different sorts of buttons -- -- Event handling in buttons -- 13 Sep 1999 Various changes in the last three weeks -- -- LIB rc_procbrowser, rc_lispbrowser, LIB ved_procbrowser -- -- Introduced define :rc_defaults for setting defaults -- -- Allowed {font } to work for buttons in rc_control_panel -- -- LIB rc_font redefined. -- -- TEACH RC_ASYNC_DEMO much improved -- -- Button event handling in LIB RC_BUTTONS improved -- 26 Aug 1999: Made the RCMENU package available. -- 25 Aug 1999: menu_choosefile1 and menu_choosefile2 -- 17 Aug BUTTONS: Bug fixes and minor changes -- 11 Aug 1999: LIB rc_browse_files extended. -- Aug 10 1999 Updater of rc_current_window_object less fussy -- 10 Aug 1999 Allowed use of symbolic, and negative, screen coordinates -- 8 Aug 1999 rc_control_panel extended and help file improved -- 1 Aug 1999 Event handling improved -- 28 Jul 1999 improved HELP RC_CONTROL_PANEL -- 25 Jul 1999 rc_make_draggable changed -- 5 Jul 1999 "Close" action on windows -- 27 Jun 1999 -- Jun 1 1999 altered LIB RC_SCROLLTEXT -- 30 May 1999 Various fixes in code and documentation -- -- Sliders -- -- Event handling -- -- rc_new_window_object and sub-panels and panel motion -- -- rc_widen_window_by and rc_lengthen_window_by -- -- rc_warp_to -- 26 May 1999 Sliders with panels, more on nested panels -- 26 May New procedures/methods for sub-panels -- 19 May 1999 nested window objects, and ARGS -- 18 May 1999 Yet more facilities based on or related to rc_scrolltext -- 8 May 1999 rc_popup_panel added, and things based on it, e.g. -- 8 May 1999 Strings in rc_scrolltext panels can now be dragged -- 8 May HELP RCLIB updated -- 1 May 1999 Clickable sliders and other utilities -- 1 May 1999 LIB RC_BUTTONS includes "invisible" action buttons -- 29 Apr 1999 LIB RC_WINDOW_OBJECT has composite widgets -- 19 Apr 1999 More abbreviations allowed for button properties -- 18 Apr 1999 Linking fields now much easier in rc_control_panel -- 16 Apr 1999 TEACH POPCONTROL -- 13 Apr LIB RC_BUTTONS, counter buttons -- 11 Apr 1999 Various additional improvements and bug fixes -- 9 Apr 1999 New features and documentation: control panels, sliders -- 6 Apr 1999 Added sliders with text input fields -- 4 Apr 1999 Many changes to rc_control_panel, sliders, buttons, text input etc. -- 30 Mar 1999 Many changes. TEACH RC_CONSTRAINED_PANEL -- 24 Mar 1999 Altered rc_polypanel -- 24 Mar 1999 Further extensions to input fields -- 22 Mar 1999 Extended number input and text input fields -- 21 Mar 1999 Documented new features in rc_control_panel -- 16 Mar 1999 Added rc_draw_coloured_square -- 25 Feb 1999 text and number input fields in rc_control_panel -- 24 Feb 1999 Step values allowed for sliders -- 21 Feb 1999 Two new procedures for drawing coloured objects -- 15 Sep 1998 rc_coloured_circles -- 24 Feb 1998 extended rc_control_panel -- 24 Feb 1998 Allowed freezable objects to be redrawn after freezing -- 8 Feb 1998 Even more changes to rc_control_panel and sliders -- 6 Feb 1998 More changes to buttons and rc_control_panel -- 4 Feb 1998 rc_draw_unscaled_blob -- 3 Feb 1998 rc_buttons and rc_control_panel updated -- 25 Jan 1998 New demo: game connect4 -- 29 Nov added rclib/demo/rc_neural.p -- 28 Nov 1997 Changed sign in y coord for slider labels -- 18 Nov 1997 ADDED LIB * RC_FREEZABLE -- 17 Nov 1997 RC_SLIDER and RC_CONTROL PANEL handle idents better -- 14 Nov 1997 RC_CONTROL_PANEL bug fixed -- 10 Nov 1997 RC_CONTROL_PANEL revamped -- 8 Nov 1997 RC_BUTTONS numeric parameters rationalised -- 6 Nov 1997 Made rc_drawline_absolute round its inputs -- 4 Nov 1997 Various changes to sliders and rc_control_panel -- -- SLIDERS -- -- RC_CONTROL_PANEL -- 10 Sep 1997 TEACH FACES, HELP RCLIB errors corrected -- 7 Sep 1997 rc_move_to and rc_move_by extended -- 5 Sep 1997 isrc_window_object -- 3 Sep 1997 rc_blocks -- 2 Sep 1997 rc_popup_query, TEACH rclib_demo.p , rc_print_strings -- 28 Aug 1997 rc_sole_active_widget rc_message rc_message_wait -- 18 Aug 1997 rc_popup_readin, rc_popup_readline -- 17 Aug 1997 rc_interpret_key, rc_text_input -- 15 Aug 1997 rc_default_window_object, rc_query_mouse -- 10 Aug: event handling in movable objects -- 6 Aug: event handling in movable objects -- 4 Aug: rc_check_window -- 3 August: "square" sliders -- 3 August: event handling -- 3 August: control panels and buttons -- 3 Aug rc_scratch_panel -- 3 Aug rc_buttons -- 25 Jul 1997 rc_control_panel -- 16 July rc_scratch_window -- 15 July rc_print_strings -- 11 July rc_scratch_window -- 11 July rc_buttons and rc_button_type_key -- 8 July 1997 rc_informant -- 9 Jul 1997 Various generalisations -- 4 Jul 1997 rc_slider, rc_distance, rc_polypanel -- 30 Jun 1997 rc_control_panel -- 29 Jun 1997 Extensions to RC_BUTTONS -- 26 Jun 1997 DEFER actions, scratch window, control panel, links -- 22 Jun 1997 Various -- 18 Jun 1997 added XSCALE and YSCALE pic descriptors -- Updated HELP * RC_LINKED_PIC -- 16 Jun 1997 new mixin: rc_linked_static -- 15 Jun 1997 modified rc_redraw_window_object etc. -- rc_drawline_absolute rc_lengthen_window_by rc_widen_window_by -- 14 Jun 1997 RC_EXTEND_UTILS -- RC_LINKED_PIC -- 11 Jun 1997 More work on LIB * RC_POINT -- 10 Jun 1997 Added rc_transfer_window_contents. -- Automatic offsets for new windows -- 20 May 1997 rc_poster rc_message_wait and new teach file -- May 4 1997 Buttons extended Added rc_warp_to -- Radio buttons and someof buttons -- Apr 27th Buttons finally working, vedreadlinefrom -- Apr 19th Changes to lib rc_mousepic and rc_window_object -- 15 Apr 1997 rc_title -- 15 Apr 1997 buttons and text fields -- 8 Apr 1997 rc_app_mouse, rc_mouse_coords -- 4th April 1997 more work on rc_window_object -- 30th March 1997 windows and ant_demo -- 25th March 1997 rc_draw_pointlist -- 22 Mar 1997 rc_mouse_limit generalised -- 27 Jan 27 1997 extended rc_blocks demo -- 14 Jan 1997 and earlier -- 2006 -- 29 Mar 2006 Added rc_get_coords_from, like rc_get_coords, but extra boolean argument determines whether it warps to the window specified. -- 2005 -- 31 Dec 2005 During 2005 as part of the re-packaging of Poplog in version 16.6 The whole rclib library was moved to $usepop/pop/packages/rclib This means that for the time being the file path names are all wrong, though they will eventually be updated. In addition the rc_polypanel program in LIB rc_polypanel $usepop/pop/packages/rclib/lib/rc_polypanel.p was modified as follows Added more sliders and buttons, making it possible to alter width and height of display window, and more speed options to suit faster cpus. Also the control panel now appears top right and the graphic panel top left. -- 2004 -- 19 Feb 2004 Serious bug in LIB rc_buttons fixed (use of sys_grbg_closure) -- 6 Jan 2004 Rectifying omissions in this news file The entry below for 19 Sept 2002 mentions new developments, demonstrated in TEACH NEWTEST.P, which were largely inspired by suggestions from Mark Gemmell. They include the following new items: -- -- rc_panelcontents( ) -> result; Where is a list of labels or special keywords. This is used to get information from a panel created by rc_control_panel Details in HELP RCLIB/rc_panelcontents -- -- rc_panel_field_value rc_panel_field_value( ) -> val val -> rc_panel_field_value( ) Returns or updates the value of an item in a panel field (where appropriate: may mishap in some cases, e.g. action buttons). is a list of labels Details in HELP RCLIB/rc_panel_field_value -- -- rc_real_contents This is a new slot available in radio and someof buttons. It enables something other than the label, and the selection state (a boolean expressed in rc_informant_contents), to be associated with the button. -- 2003 -- 20 Jul 2003 print_to_strings define print_to_strings(procedure print_command); Added a new library procedure, which takes a procedure that does some printing, and alters it so that printing instead of going to the terminal goes into a set of strings left on the stack. This is useful for re-directing print output to a display panel. For an example see HELP RCLIB/print_to_strings -- 2002 -- 19 Sep 2002 popmemlim increased The file rclib.p now sets popmemlim to at least 3000000 You may need to increase this for some applications. -- 19 Sep 2002 New facilities for accessing and updating panel fields A temporary file has been provided with test commands for the new facilities. See TEACH NEWTEST.P It will later be merged with other documentation files, e.g. HELP RC_CONTROL_PANEL -- 19 Sep 2002 rc_control_panel Various changes listed in the Revision history section of LIB * rc_control_panel Includes fixing sliders with "round" set in specification. -- 16 Sep 2002 ved_read_from_file Bug fixed: This will no longer assign a dead window object to rc_current_window_object -- 16 Sep 2002 Printing rationalised Wherever possible printing now goes into the file whose name (a string) is in the variable rc_charout_buffer Default is './output.p'. Make it false to stop output going into a ved buffer. The variable "async_vedbuffer" is now a synonym for "rc_charout_buffer" and may later be withdrawn. -- 16 Sep 2002 ved_read_from_file Made to use readline in contexts where it can't get to a file, e.g. xved not running, just interacting with terminal -- 14 Sep 2002 rc_handle_vedwarpcontext This procedure is now used by procedures in LIB rc_mousepic, to turn off automatic warping of the mouse pointer that might otherwise be enabled by vedwarpcontext in XVed. Currently rc_handle_vedwarpcontext makes vedwarpcontext false, but may later be changed to allow users to specify which kinds of automatic mouse warping to allow. (It should perhaps also do something with wvedalwaysraise). -- 12 Sep 2002 Much documentation updated New REF directory (Thanks to Jonathan Cunningham) With two files to start with REF * RC_BUTTON REF * RC_SLIDER Other documentation files updated recently HELP * RC_BUTTONS HELP * RC_CONTROL_PANEL HELP * RC_DIAL HELP * RC_EVENTS HELP * RC_KEYCODES HELP * RC_SCROLLTEXT HELP * RC_SLIDER HELP * RC_TEXT_INPUT HELP * RCLIB HELP * RCLIB_NEWS TEACH * RC_ASYNC_DEMO TEACH * RC_CONSTRAINED_PANEL TEACH * RC_CONSTRAINED_POINTER TEACH * RC_CONTROL_PANEL TEACH * RC_DIAL TEACH * RCLIB_DEMO.P -- 12 Sep 2002 rc_handle_event and rc_really_handle_event In LIB rc_mousepic Global variable: rc_inside_callback Normally false, but made true while a callback is still running. Should be false when the pop-11 handler runs. Split rc_handle_event into two procedures. rc_really_handle_event rc_handle_event rc_really_handle_event does what the old version did, namely handle events or possibly postpone them. The new rc_handle_event uses external_defer_apply to ensure that rc_really_handle_event is run outside the callback context. (I.e. rc_inside_callback should then be false.) rc_handle_event uses vedinput to start a closure of rc_really_handle_event in the case where XVed is in use and is waiting for input. Otherwise rc_handle_event simply uses external_defer_apply to run rc_really_handle_event In addition cucharout, cucharerr, and prmishap are redefined to direct output to a ved buffer specified by rc_charout_buffer (a string, default './output.p') As a result of these changes, the keywords "INVED", "POPNOW" for action buttons are no longer needed as they are both equivalent to "POP11" The "DEFER" keyword still remains for actions that need to be outside the context of the window invoking the action, e.g. to be able to change rc_current_window_object -- 12 Sep 2002 rc_consolidate_all_input(panel:rc_panel); This finds all the text intput fields in the panel and consolidates them. -- 6 Sep 2002 compilation modes relaxed Many of the files have had compile_mode declarations inserted or changed, using a more relaxed compilation mode that makes it easier to redefine part of a library during development and debugging, e.g. to insert temporary tracing commands. Many of the class and mixin definitions have had "var" added to the headers, for the same reason. -- 6 Sep 2002 rc_kill_window_object In LIB rc_window_object the method rc_kill_window_object(win_obj:rc_window_object); has been modified to overcome a timing problem by invoking rc_window_sync(); -- 26 Aug 2002 Extensions to LIB rc_scrolltext The scrolling procedures are changed to behave more consistently and to update rc_informant_value if appropriate; Added new method to refresh part or all of the visible lines in the text panel rc_scrolltext_refresh(obj:rc_scroll_text, start, fin); Added an autoloadable library defining a method for inserting new strings in a scrolling text field. See LIB rc_insert_strings_scrolltext rc_insert_strings_scrolltext(obj:rc_scroll_text, strings, loc, mode); -- 25 Aug 2002 replaced "rc_informant_contents" with "rc_informant_value" The former is left as a synonym for the latter, to enable old user code to continue work. -- 25 Aug 2002 Extended keycode mappings in LIB rc_interpret_key Extended to recognize more keys on a 105 key PC keyboard with linux. (NB you may need to modify the mappings for a different system) -- 13 Aug 2002 Changed some printing formats Changed print_instance, for dials and several button types to give more useful information. Dials now give ange of pointer and value as separate numbers. -- 13 Aug added rc_undefined for default rc_informant contents -- 8 Aug 2002 More extensions to control_panel facilities rc_set_radio_panelfield rc_button_in_panelfield rc_set_someof_panelfield rc_unset_someof_panelfield -- 8 Aug 2002 Changed compile mode for many libraries Changed to make far fewer procedure identifiers constants. -- 4 Aug 2002 Extensions to control_panel facilities rc_consolidate_input(texintput); Consolidate text or number input button, if necessary rc_consolidate_all_input(panel:rc_panel); makes sure that all text input and number input fields are 'consolidated'. I.e. if they were left in an 'editing' state that state is turned off, and the current contents can be accessed. rc_item_in_panelfield(label, fieldlabel, panel) -> item; rc_val_in_panelfield(label, fieldlabel, panel) -> val; val -> rc_val_in_panelfield(label, fieldlabel, panel) -- 2 Aug 2002 LIB interpret_specs extended with abbreviations Expanded to use user definable table featurespec_abbreviation = identfn; Can be a property which maps an abbreviation onto a word or a field-accessor procedure with updater. accessed through expand_spec_field_name(name) -> proc; Now invoked by interpret_specs(obj, specs) -- 2 Aug 2002 rc_informant_label Extended LIB RC_INFORMANT by providing a property rc_informant_label to make it easier to find a button, slider, dial etc. in a list of items. If they can have labels then it will no longer be necessary to identify them by location in the list. This procedure is provided: define rc_informant_with_label(label, list) -> item; ;;; Check that label, usually a string or word, is one of the labels ;;; of the items in the list. ;;; Return the item with the label or false. -- 31 Jul 2002 Documentation files improved These files have been significantly improved: TEACH RCLIB_DEMO.P HELP RC_BUTTONS HELP RC_CONTROL_PANEL -- 28 Jul 2002 New default isrc_panel_field See LIB isrc_panel_field (made available in case the recognizer is required before LIB rc_control_panel has been compiled) -- 28 Jul 2002 New checking procedure rc_check_window_object(); lvars win_obj = rc_current_window_object; unless rc_islive_window_object(win_obj) then mishap('LIVE rc_current_window_object needed', [^win_obj]) endunless; -- 27 Jul 2002 Facilities for handling resize events on window objects -- -- Changes to LIB RC_WINDOW_OBJECT define :mixin rc_resizeable; slot rc_resize_handler ="rc_resize_object"; define :method rc_resize_handler(pic:rc_linepic); Altered rc_window_location so that when invoked on a window whose rc_resize_handler slot holds a non-false value it updates size of the X graphic object if the window object has been resized using mouse or a resize program command. rc_resize_threshold is an integer, controlling the minimum size change before the window resize event handler is triggered. -- -- Extensions to LIB RC_MOUSEPIC to support resize event handling Added mechanisms for re-sizing a window object. define :method rc_set_resize_handler(win_obj: rc_window_object); Sets a resize handler for resize events. This is invoked by rc_mousepic, if the second argument of rc_mousepic contains the word "resize" define :method rc_resize_object(win_obj:rc_resizeable); The name of this is the default value of the rc_resize_handler slot in instances of rc_resizable define RC_DO_RESIZE_ACTIONS(widget); This is the callback procedure associated with the window object by rc_set_resize_handler. It invokes the next procedure define vars procedure rc_do_resize_actions(widget_or_shell); User definable generic resize handler. It gets the value of rc_resize_handler slot, and applies it to the window object. -- 27 Jul 2002 rc_redraw_this_panel(); This procedure, which can be associated with an action button, uses rc_redraw_window_object to redraw the panel containing the button. -- 23 Jul 2002 new auto-loadable procedure rc_run_deferred_events define rc_run_deferred_events(); rc_sync_display(); ;;; now process previously deferred events. unless Events_list == [] do rc_process_event_queue(); endunless; unless Deferred_events_list == [] do rc_do_deferred_list(); endunless; enddefine; After ensuring that all previous display events (e.g. drawing events have been completed), this will run events that were deferred because rc_in_event_handler was true when an attempt was made to invoke them or because they involved action buttons using DEFER (See HELP rc_buttons) It can be used with LIB SIM_AGENT. E.g. call it in sim_run_agent to ensure deferred events are handled after each agent runs, if the agents can draw on the display and suppress event handling when they do so. This is sometimes needed to ensure button and drag events are not kept waiting indefinitely because of program generated activity on the screen. -- 23 Jul 2002 Extended TEACH RC_ASYNC_DEMO Now includes buttons to increase or decrease speed -- 19 Jul 2002 Fixed some documentation in HELP RCLIB, RC_BUTTONS Still need to record the following additions in HELP RCLIB -- 19 Jul 2002 Extended rc_mousepic event handling An irritating problem has been partly cured A simulation object is movable by the program Its picture on a screen is movable by the mouse If you try to move it with the mouse when the program is trying to move it, the result can be a permanent mess on the screen. Partial cure: a new method defined in LIB rc_mousepic rc_under_mouse_control(pic:rc_selectable) -> bool; allows "guards" to be set up to prevent program code from moving an object when it is already under the control of the mouse. For this to work programs have to follow the conventions according to which the the default rc_button_1_down method applied to a selectable object does obj -> rc_mouse_selected(rc_active_window_object); Then the methods to move or rotate objects should do this at the beginning, if OBJ is the thing to be moved: returnif(rc_under_mouse_control(OBJ)); Other changes to LIB rc_mousepic Added procedure rc_release_mouse_control E.g. invoked if you click in empty space in a window. Maybe should be invoked in other conditions. Added global variables now automatically made true or false by low level button event handlers: rc_button_1_is_down rc_button_2_is_down rc_button_3_is_down Made these no longer lconstant rc_do_deferred_list rc_is_contained_window RC_DO_BUTTON_ACTIONS RC_DO_MOVE_ACTIONS RC_DO_MOUSE_ACTIONS RC_DO_KEYBOARD_ACTIONS rc_do_addpic_to_window -- 2001 -- 19 Mar 2001 Fixed rc_draw_arc_segment The procedure rc_draw_arc_segment previously did not take account of rc_frame_angle to rotate the segment. This has now been fixed. -- 19 Mar 2001 Fixed rc_informant in XVed The reactor methods did not always behave as expected if run with XVed active and attempting to write to Ved buffer. Now fixed -- 18 Mar 2001 DIALS documented and further generalised HELP RC_DIAL TEACH RC_DIAL Both give new more accurate information about the dials package. The procedure rc_dial has been generalised to allow symbolic arguments specifying orientation ("up", "down", "left", "right") and whether it is a semi-circle, quarter-circle or full circle ("semi", "quarter", "circle"). -- 12 Mar 2001 Introduced rc_draw_rotated_rect.p For drawing a filled rectangle with centre at a given location rotated a certain angle. -- 12 Mar 2001 More work cleaning up the implementation of dials, and the rc_constrained pointer package they use. Introduced rc_undraw_dial and rc_redraw_linepic -- 9 Mar 2001 Improved rc_control_panel for sliders and dials It is now possible to specify individual reactors for sliders and for dials. Previously sliders in a field had to share a reactor. Made further changes to rc_control_panel, e.g. to support abbreviations in featurespec vectors. Using global variable rc_panel_abbreviations Fixed incorrect documentation about reactor parameters in HELP rc_slider, and added an example of a reactor procedure -- 18 Jan 2001 Expanded HELP RCLIB, introduced rc_display_file The autoloadable library procedure rc_display_file makes it easy to display a file in a read-only scrolling text panel. A line of the file can be made the selected line, accessible by programs. It uses rc_display_strings HELP RCLIB has been expanded with more detailed descriptions of rc_display_strings and a descrptino of rc_display_file See HELP rclib/rc_display_strings HELP rclib/rc_display_file -- 2000 -- 24 Dec 2000 Added rc_draw_coloured_line rc_draw_coloured_line(x1, y1, x2, y2, colour, linewidth); -- 19 Dec 2000 New library and teach file rc_sprite TEACH rc_sprite gives an introduction to LIB rc_sprite which shows how to use the RCLIB package to create a rotating movable object (a "sprite") shaped like a triangle, whose orientation reveals the current heading, and whose movement is in the direction of the current heading. -- 5 Dec 2000 Bug fixed in windows with embedded windows. Matthieu Schutz reported this problem: if a panel is inserted in another panel, then attempting to kill the window using the window manager "close" function kills only the sub-panel. Another close kills the whole thing. Fixed by changing rc_destroy_widget to kill the outermost container. -- 28 Nov 2000 improved rc_pythagoras demo Do lib rc_pythagoras and then obey instructions -- 19 Nov 2000 morphing facilities extended to sets of pictures LIB rc_transform_pictures added, rc_transform_pictures(pics, steps, delay, trail); each pic is a vector or list: startcoords, endcoords, colour, widthOrShape, mode, proc Use showlib to look at the file and try out the examples near the top of the file. Documentation will be inserted in HELP RCLIB Also added fast_interpolate_coords. Similar to rc_interpolate_coords but assumes the first two arguments are vectors, and uses fast_subscrv. Fixed freepointvector, to ensure that it doesn't get confused if a garbage collection occurs while it is running. -- 17 Nov 2000 new facilities for morphing sets of lines LIB rc_interpolate_coords rc_transform_lines, rc_pythagoras rc_interpolate_coords(coords1, coords2, S, stepnum, coords3) -> coords3; coords1 is a list or vector of 2N numbers representing N points, as are coords2 and coords3. The values of the coordinates in coords1 and coords2 are used to produce an interpolated value in coords3 on the assumptino that there are S interpolation steps and this is step stepnum. So if the values or the kth components of coords1 and coords2 are x1 and x2, then the corresponding value of coords3 will be x1 + (x2 - x1)*stepnum/S This can be used repeatedly to interpolate coordinates when morphing between two sets of lines, as in rc_transform_lines rc_transform_lines( coords1, coords2, steps, colour, widthOrShape, mode, delay, trail, proc); coords1 and coords2 are as above. steps is the number of transformations to use for intermediate states between coords1 and coords2. colour is used to draw the lines or polygons. proc is one of the procedures rc_draw_lines -- for open polygons rc_draw_lines_closed -- for closed polygons rc_draw_lines_filled -- for filled polygons the widthOrShape parameter is line width for open or closed polygons and one of Conved, Nonconvex or Complex for filled polygons. mode is one of CoordModeOrigin or CoordModePrevious delay is an integer representing the delay in 100ths of a second between drawn stages. make this smaller for faster morphing. If trail is true, then the intermediate steps are left drawn, otherwise they are drawn and deleted, using XOR or EQUIV, according to Glinefunction. LIB rc_pythagoras uses the above to demonstrate the purely graphical Chinese proof of pythagoras' theorem dynamically, by moving squares and triangles around. To run it either do lib rc_pythagoras or Showlib rc_pythagoras followed by ENTER l1. Either way instructions are printed out. -- 16 Nov 2000 Bug fix in getpointvec By accident the version of getpointvec installed in August was a slightly out of date file. It has now been replaced. The new version does not create shortvecs but full vectors, because it is possible to have points with decimal (real) coordinates. These will be rounded after transformation by rc_transxyout in the procedures that use getpointvec, e.g. rc_draw_lines Also if getpointvec is given a vector and the third argument is not true (i.e. the picture to be drawn is not closed) then the vector is returned. The documentation has been corrected. See HELP RCLIB/getpointvec -- 8 Oct 2000 Adjustment for title bar if window location is "bottom" Minor change to rc_new_window_object. If the y value for new window is "bottom" and rc_title_allowance is not yet known then a value is guessed, to stop the first window being too low down. -- 15 Sep 2000 NEW: HELP RC_EVENTS, and some event-handling fixes The new file HELP RC_EVENTS now gives a comprehensive account of event handling in RCLIB. Writing it revealed a few design flaws that have now been addressed, as described in that file. 1. A window can now be made drag sensitive without being move sensitive, by using the "dragonly" property in the list given to rc_linepic or in the events property in the input to rc_control_panel. The rc_window_object class now has a slot rc_drag_only whose value normally false, but can be made true to allow dragging events to be handled without allowing motion events to be handled. 2. "Transparent" picture objects now allowed Previously the "topmost" sensitive picture object in the right place would be given an event to handle even if it was incapable of handling it. If the new global variable rc_transparent_objects is set true, then in such cases the event will fall through to the first competent picture object, and failing that the window_object. This requires a new method and a new procedure: rc_picture_selected_type(win_obj:rc_window_object, x, y, type) -> num; find_selected_object_type(window_obj, x, y, type) -> obj; Two older procedures are no longer used by the system handlers, but remain available in case required. rc_picture_selected find_selected_object_type Added two new (part) methods for keysensitive items which are not instances of rc_selectable: rc_add_pic_to_window(pic:rc_keysensitive, win_obj:rc_window_object, atfront); rc_remove_pic_from_window(pic:rc_keysensitive, win_obj:rc_window_object); LIB rc_window_object has been changed. The mixin rc_keysensitive now ensures that its instances have a rc_mouse_limit slot, in case the mixin is used independently of rc_selectable. -- 10 Sep 2000 Tidied event handling further, new HELP file Also renamed real_handle_event as rc_process_event_queue Further improved documentation on event handling mechanisms in LIB rc_mousepic. HELP RCLIB slightly improved. Some information moved from RCLIB to RC_EVENTS and expanded. Much information moved from HELP RC_LINEPIC to HELP RC_EVENTS Some of the structure of event handling in LIB rc_mousepic has been clarified, especially processing of "deferred" items. New variable in_rc_process_event made true while an event is being processed in rc_process_event. If new events turn up to be processed while it is true they are put on then event queue. -- 2 Sept rc_add_kill_button Adds a KILL button to a window object rc_add_kill_button(win, x, y, buttonwidth, buttonheight); ;;; assume window produced by rc_new_window_object ;;; if x is false use right edge of window ;;; if y is false us bottom edge of window -- 14 Sep 2000 Dials allowed in rc_control_panel, but incomplete -- 30 Aug 2000 rc_dial A new powerful library LIB rc_dial has been added, making it easy to create interactive dials with mouse-movable pointers and automatically formatted gradations, labels, etc. Documentation is in TEACH RC_DIAL. Additional documentation will later be added to HELP RCLIB Some of the background mechanisms are described in TEACH RC_CONSTRAINED_POINTER -- 26 Aug 2000 rc_constrained_pointer.p rc_constrained_rotater.p These libraries had a number of flaws, which have now been cleaned up, and the introductory TEACH file extended and clarified. See: TEACH RC_CONSTRAINED_POINTER for details. These facilities will be extended soon. -- 23 Aug 2000 New facilities leading towards decorations on dials rc_draw_arc_segment(xcentre, ycentre, radius, startangle, incangle, width, colour); rc_draw_arc_segments(xcentre, ycentre, radius, start, gap, lim, inc, width, col); ;;; Draw sequence of segments of angular width inc, and linewidth width, ;;; at angular locations specified by start, gap, lim rc_label_dial(xcentre, ycentre, radius, start, inc, lim, num, incnum, colour, font); ;;; draw numbers starting at num, incremented by incnum at locations ;;; specified by the first six arguments as in rc_draw_arc_segments Improved the mouse sensitive region in rc_constrained_pointer -- 20 Aug 2000 -- -- New facilities for interacting through Ved/Xved files ved_open_file(name, x, y, cols, rows, saveable); ved_write_to_file(item, file); ved_read_from_file(string, file) -> list; open the file with the following defaults if it does not already exist, and then read a line of text, terminated by RETURN and return it, as readline does ;;; default location for file rc_ved_x_default = 300; rc_ved_y_default = 300; ;;; default number of rows and columns rc_ved_cols_default = 40; rc_ved_rows_default = 8; (QUIT the file with 'ESC q' or ENTER q) -- -- New polygon facilities LIB rc_draw_lines The following facilites make use of the procedures XpwDrawLines XpwFillPolygon defined in REF XpwPixmap. rc_draw_lines(coords, colour, linewidth, mode); rc_draw_lines_closed(coords, colour, linewidth, mode); rc_draw_lines_filled(coords, colour, shape, mode); They allow open and closed or filled polygons to be drawn efficiently, and in the case of the non-filled polygons produce neater corners than is possible with repeated use of rc_drawline To make these available do uses rc_draw_lines Details in HELP RCLIB Those facilities use a new library LIB getpointvec which provides a mechanism for converting a list or vector into a shortvec as required by XpwDrawLines XpwFillPolygon etc. There is a utility for returning those vectors to a free list: freepointvec -- -- rc_draw_triangle improved, and used in rc_scrolltext It no longer uses rc_drawline. Instead it calls XpwDrawLines and is therefore more efficient and looks better. This is now used in scrolling text panels. See HELP RC_SCROLLTEXT -- -- New keyword "INVED" for button actions I have finally sussed out (I think) how to make asynchronous button actions which interact with XVed work properly. The keyword INVED can be used. Outside XVed these button actions are treated as equivalent to POP11 button actions. For details see HELP rc_buttons/'Keyword "INVED"' Also see HELP rc_control_panel -- 3 Aug 2000 New drawing primitives for rectangles and triangles rc_draw_filled_centred_rect(x, y, width, height, colour); rc_draw_filled_rect(x, y, width, height, colour); rc_draw_filled_triangle(x1, y1, x2, y2, x3, y3, colour); rc_draw_triangle(x1, y1, x2, y2, x3, y3, colour, linewidth ); Details in HELP RCLIB -- 23 Jul 2000 various improvements -- -- Horizontal and vertical slider blob methods LIB rc_slider has two new methods, rc_draw_hor_slider_blob rc_draw_vert_slider_blob both now used in LIB rc_scrolltext -- -- RCMENU improvements The rcmenu package has been improved and the documentation clarified. The package is available at http://www.cs.bham.ac.uk/research/poplog/rcmenu.tar.gz The overview help file is http://www.cs.bham.ac.uk/research/poplog/rcmenu/help/ved_menu -- -- Documentation updates Improved/extended documentation in HELP RC_CONTROL_PANEL TEACH RC_CONTROL_PANEL HELP RCLIB -- -- rc_control_panel extensions and changes New properties allowed In RADIO and SOMEOF fields {chosenbg } The string specifies the background colour when a button is selected. In RADIO, SOMEOF, ACTIONS and SCROLLTEXT fields {textfg } {textbg } In SLIDERS fields {labelfont } can be used to specify font for end labels. Changed various default fonts to use helevetica fonts: '-adobe-helvetica-bold-r-normal-*-10-*-*-*-p-*-*-*'; For panel '-adobe-helvetica-bold-r-normal-*-12-*-*-*-p-*-*-*'; For fields of the panel, e.g. textin rc_slider_field_font_def. Defaults to '-adobe-helvetica-bold-r-normal-*-10-*-*-*-p-*-*-*'; rc_scroll_text_field_font_def Defaults to '6x13' (For some reason 6x12 doesn't work.) -- -- rc_display_strings This uses smaller font by default, and there is now a variable rc_display_strings_buttonwidth_def to control default button width. Found that using 6x12 as default scrolltext font size did not work for some reason. Changed to 6x13 (in LIB rc_control_panel). -- -- rc_browse_files improved Introduced rc_browser_button_width_def for default button width in displays. Modified the effect of the "action" button. If an action name that is typed in begins with 'ved_' the file is edited and the command run in that buffer. E.g. if it is a latex file, then the command "ved_latex" in the action field will be equivalent to ENTER latex. rc_browse_files is potentially very powerful, but needs more work, with its own help file. Added a 'Clear filter' button -- 21 Jul 2000 More control over fonts, default font sizes reduced Seeing attempts to use the rclib package on a low resolution PC screen made it clear that many of the default font sizes were too large. So a lot of them have been reduced in size, e.g. to '-adobe-helvetica-bold-r-normal-*-10-*-*-*-p-*-*-*'; LIB rc_slider modified Added rc_slider_labels_font slot and rc_slider_labels_font_def, allowing strings printed as labels to have a font. Also allowed the list of endstrings to start with a string specifying a font. Modified HELP rc_slider file and relevant bits of some other documentation files to demonstrate the new syntax. Changed compilation mode to be less strict for rc_slider, rc_control_panel, and a few others. -- 10 Jul 2000 Various extensions -- -- HELP rclib revised and extended, with a more logical structure (I hope). See its table of contents. -- -- New method rc_set_window_scale rc_set_window_scale(win_obj, type, xscale, yscale) Generalised rc_set_scale, to apply to window objects. -- -- New mixin rc_rotatable_picsonly Suggested by Matthias Scheutz This extension to LIB rc_linepic makes it possible to define a class of rotatable objects whose associated strings are not rotated. This allows a rotating object to keep its label(s) in the same place. -- -- New method rc_change_picture Suggested by Matthias Scheutz rc_change_picture(pic, newx, newy, newlines, newstrings); A new method defined for rc_linepic_movable and all its descendants. Draws an old picture object in a new location with new values for rc_pic_lines and/or rc_pic_strings. If either of newlines or newstrings is false, the corresponding old slot value is retained Required a minor change to the version of method rc_move_to in lib sim_picagent, which was not defined correctly. -- 6 Jul 2000 New method rc_shift_window_frame_by Suggested by Matthias Scheutz rc_shift_window_frame_by(x, y, win_obj); Alters the location of the origin of the window object by the amounts, x and y relative to the current scales. Should this be a method? -- 4 Jul 2000 Improved sliders, scrolltext, rc_control_panel On the basis of LIB rc_opaque_mover, introduced in June, a number of improvements have been made. -- -- New library rc_opaque_slider There is now a new type of slider introduced in LIB rc_opaque_slider which overcomes the problem previous problems of sliders with bars which are not white due to use of Xor or Equiv for moving objects (described in HELP rclib_problems). The new type allows arbitrary combinations of colours for slider blob and slider bar because the slider is now an instance of rc_opaque_movable. Opaque sliders can now be created using the procedure rc_opaque_slider rc_opaque_slider( x1, y1, x2, y2, range, radius, linecol, slidercol, strings) -> slider; Other optional arguments are allowed. HELP rc_slider will be updated shortly. -- -- Improved rc_scrolltext LIB rc_scrolltext has been changed to use rc_opaque_slider, so that it no longer requires panel sliders, which use a separate movable window. It now draws a rectangular region within which the sliders and scrolling text widget are located. The result has a neater appearance and is more efficient. -- -- Improved rc_control_panel LIB rc_control_panel has been changed so as to use opaque sliders by default now, and also the new format for rc_scrolltext. Some additional field specifiers have been introduced for scrolltext fields, i.e. text_fg text_bg blobrad surroundcol blobcol -- -- Improved rc_display_strings LIB rc_display_strings now benefits from the above changes, and uses the following new global variables for setting defaults. rc_display_strings_fieldbg_def rc_display_strings_textfg_def rc_display_strings_textbg_def rc_display_strings_surround_def rc_display_strings_blobcol_def These can be re-assigned locally to produce panels with different appearance from the default. -- -- Modified rc_neural demo The neural net demo (ENTER rcdemo rc_neural) has been changed to use the new opaque slider facility. So panels are now more colourful. -- 21 Jun 2000 New facilities related to pointers and dials -- -- New class rc_constrained_pointer See TEACH rc_constrained_pointer (To be extended) -- -- rc_rotate_vector rc_rotate_vector(x, y, ang) -> (x, y); Autoloadable library -- -- New mixin rc_constrained_rotater define :mixin rc_constrained_rotater; is rc_constrained_mover; Used to define rotatable objects constrained to have one end fixed. Various associated methods, e.g. rc_constrain_rotater(pic:rc_constrained_rotater, ang)->newang; rc_pivot_coords(pic:rc_constrained_rotater); updaterof rc_pivot_coords(/*x, y,*/ pic:rc_constrained_rotater); rc_end_coords(pic:rc_constrained_rotater); updaterof rc_end_coords(/*x,y, */ pic:rc_constrained_rotater); rc_real_end_coords(pic:rc_constrained_rotater) -> (x,y); updaterof rc_real_end_coords(x0, y0, pic:rc_constrained_rotater); rc_set_axis(pic:rc_constrained_rotater, ang, mode); rc_ang_to_point(pic:rc_constrained_rotater, x, y) -> ang; rc_move_to(pic:rc_constrained_rotater, x, y, mode); rc_move_by(pic:rc_constrained_mover, dx, dy, draw); This was required for rc_constrained_pointer -- 21 Jun 2000 rc_ant_demo Now has a larger panel and more ants by default. should be redone using newer rclib facilities. -- 18 Jun 2000 New facilities to support opaque movers -- -- Modified LIB rc_linepic introduced method rc_set_drawing_colour(pic:rc_linepic, colour, window); for use with opaque moving objects -- -- Introduced LIB rc_opaque_mover With examples in TEACH rc_opaque_mover It provides two new mixins, with associated methods define :mixin rc_opaque_movable; is rc_linepic_movable; define :mixin rc_opaque_rotatable; is rc_opaque_movable rc_rotatable; Movable or rotatable items of this type can be drawn in such a way that they show the correct colours. However when undrawn, e.g. when moving, they restore only the background colour, not previously visible pictures with colours different from the background. Used in rc_constrained_pointer -- -- Modified updater of rc_foreground to do nothing if rc_foreground_changeable is false -- 17 Jun 2000 New drawing procedures: blobs and pointers -- -- rc_draw_blob_sector rc_draw_blob_sector(xcentre, ycentre, radius, startangle, incangle, colour); Draws part of a blob in a possibly squashed square of side 2*radius with top left corner located such that xcentre,ycentre is at the centre of the square. The startangle for the sector is measured counter clockwise from east (3 o clock) when rc_yscale is negative and clockwise when it is positive. The incangle is measured in the same direction. Should startangle be measured from the west if rc_xscale is negative?? (May change. See LIB * rc_draw_blob_sector -- -- rc_draw_semi_circle rc_draw_semi_circle(xcentre, ycentre, radius, orientation, colour); is defined to be equivalent to rc_draw_blob_sector(xcentre, ycentre, radius, orientation, 180, colour); -- -- rc_draw_scaled_blob rc_draw_scaled_blob(xcentre, ycentre, radius, colour); Draws a blob at the location specified with the radius specified. If rc_xscale and rc_yscale are different the blob may be elliptical instead of circular. -- -- rc_draw_pointer rc_draw_pointer(xcentre, ycentre, radius, angle, width, colour); Uses rc_draw_blob_sector to draw a pointer in the form of a sector of a circle, with the thick end at xcentre,ycentre and the thin end radius away in direction determined by angle, the width being the angular width -- 16 Jun 2000 rc_draw_blob Changed to use XpwFillArc. Should have been done originally Should be faster, but otherwise indistinguishable -- 16 Jun 2000 LIB rc_buttons improved Completely reorganised and easier to understand I hope. Must still update HELP rc_buttons and HELP RCLIB Made default background colour for toggle/counter/someof/radio buttons grey95 Fixed bug to do with mouse sensitivity of a tall button (large button width Fixed various formatting details, and made it easier to modify defaults. Introduced a separate default "blob" size for display buttons in the global variable rc_button_default_blobrad Cleaned up and reorganised the file. The method modify_instance now has only three arguments: modify_instance(button, contents, type); The method rc_draw_button_type now has only four arguments rc_draw_button_type(pic, blobrad, height, colour); -- 15 Jun 2000 fixed rc_redraw_window_object This is part of LIB rc_control_panel, and did not work on panels containing rc_scrolltext instances. Fixing it included adding rc_undraw_ methods in LIB rc_buttons define :method rc_undraw_button_background(pic:rc_button, mid, border, blob_rad, width, height); define :method rc_undraw_button(pic:rc_button); define :method rc_undraw_linepic(pic:rc_button); -- 14 Jun 2000 Introduced rc_font_dimensions rc_font_dimensions(font, string)-> (width, height, ascend, descend); Returns the width of the string for that font, and also the font's height, ascender and descender size. -- 4 Jun 2000 TEACH popcontrol modified The file illustrates the way rc_control_panel can be used to define a panel for setting and showing values for Pop-11 and Ved globals (boolean and numeric), and illustrates the use of rc_scrolltext to make it easy to get at a collection of help files through the panel. The new version of the panel now makes it easier to get rclib help files. -- 8 Mar 2000 HELP RCLIB extended and reorganised This was a major rewrite of parts of HELP RCLIB, including providing more information on the core mixins and classes, and the event handling mechanisms. See especially these sections -- The class structure of RCLIB -- Making a window sensitive to mouse or keyboard events -- How events are handled -- Event handling methods -- Event handling contexts and -- Global variables -- 7 Mar 2000 Multiple event handlers LIB * rc_mousepic has been modified to allow event handlers to be lists. So now an event handler can be false: do nothing a procedure or method: run it with appropriate arguments a word, whose valof is a procedure or method: run it a list of procedures or words: run them all with appropriate arguments. However if one of them makes the global variable rc_no_more_handlers TRUE then no others will be run after it (handling the same event). Apart from the global variable rc_no_more_handlers, there are three additional autoloadable utility procedures rc_current_handlers(obj, slot, /*num*/) -> handlers; handlers -> updaterof rc_current_handlers(obj, slot, /*num*/); If num is provided it should typically be 1,2 or 3, representing a button, e.g. for the rc_drag_handlers slot. You can use this procedure with dlocal to ensure that even if the handlers for a window or picture object are changed inside a procedure, the changes will be restored when the procedure returns. E.g. to ensure that the button 1 up handlers for obj are restored on exit from a procedure do this: dlocal % rc_current_handlers(obj, rc_button_up_handlers, 1) %; rc_add_handler(obj, handler, slot, /*num, atend*/); num is an optional integer, for slots that typically hold a three element vector. atend is an optional boolean, which defaults to false, specifying that the new handler should be put at the end of the list of handlers handler can be a procedure(method) or word whose valof is a procedure(method), or false. If handler is FALSE, then the handlers are all cleared. rc_delete_handler(obj, handler, slot, /*num*/); num is an optional integer, for slots that typically hold a three element vector. handler can be a procedure(method) or word whose valof is a procedure(method). -- 27 Feb 2000 New Utility rc_screensize rc_screensize() ->(width, height); Gives width and height of current screen. -- -- LIB RC_WINDOW_OBJECT now compatible with popvision Some time ago, two of the rc_graphic procedures rc_start and rc_new_window were changed to ensure that they created instances of the class rc_window_object, which could then be used in conjunction with a wide range of rclib utilities. However, the behaviour of rc_start and rc_new_window were slightly inconsistent with the previous versions, which interfered with the functioning of some Popvision procedures, e.g. rci_show, rc_array. This has now been fixed, by further minor changes to LIB RC_WINDOW_OBJECT -- 20 Feb 2000 rc_make_current_window New autoloadable library procedure rc_make_current_window(win_obj); Puts an action to make win_obj the current window object onto the defer list. See LIB * rc_mousepic for details of rc_defer_apply -- -- rc_drawline_relative, rc_drawline_absolute These two procedures, now use the same convention as rc_foreground. If the colour argument is false, the figure is drawn using the current default foreground. If it is the word "background" then the current background colour is. See their definitions in HELP * rclib rc_draw_coloured_square, which uses rc_drawline_relative, now follows the same convention. When the updater of rc_window_location is used to extend the height or width of a window, it now uses rc_drawline_absolute with "background" argument, to extend the window. -- -- rc_new_window_object This procedure when given an extra "container" argument used to use rc_lengthen_window_by and rc_widen_window_by if needed to ensure that the container is expanded to include the new sub-panel. Instead it now simply uses the updater of rc_window_location to ensure the change of size. -- 19 Feb 2000 Changes: rc_message, rc_message_wait, rc_foreground Altered rc_message_wait and rc_message to allow keypress as well as mouse button to dismiss the window. Altered the updater of rc_foreground to allow false -> rc_foreground(window) To leave the default foreground unchanged (useful for some drawing utilities that take a colour to use as foreground). Also allowed "background" -> rc_foreground(window) to make the current background the foreground. Consequently rc_draw_bar and other things can have false or "background" as a colour instead of a string. Fixed some of the demos in rclib_demo.p to reflect the above, and altered documentation, e.g. in HELP RCLIB. Fixed stacklength bug in rc_getinput. 1999 -- 27 Dec 1999 new rc_setup_linefunction and colour and font defaults LIB * rc_setup_linefunction has been changed so that it now uses XDefaultDepth(XptDefaultDisplay, 0) to find out the screen depth, and copes properly with displays with more than 8 bits. This makes the stopgap LIB * rc_exceed redundant. LIB * rc_buttons now uses a slightly darker shade of grey for selected RADIO and SOMEOF buttons, and the temporary border colour of selected action buttons. The default is now 'grey75' for both rc_button_chosenground_def rc_button_pressedcolour_def LIB * rc_polypanel has now been changed to make the control panel fit more easily on a 1024x768 screen. -- 16 Dec 1999 Added rc_get_coords Makes it easier for a program to get a picture location from a user. See HELP * RC_GET_COORDS. -- 10 October 1999 Compatibility with RC_GRAPHIC teach files. Following the introduction of the RCMENU package in August/September 1999, the problem of compatibility between RCLIB mechanisms and the original RC_GRAPHIC facilities described in TEACH RC_GRAPHIC and HELP RC_GRAPHIC became acute. A solution was devised and implemented, which is described in HELP * RCLIB_COMPATIBILITY Please read this if you are familiar with rc_graphic, and rc_graphplot, and intend to use some of the examples in its teach and help files. NB fewer procedures now automatically assign to rc_current_window_object when then create a window object. E.c. rc_control_panel no longer does. So do the assignment explicitly if you need to. -- -- rc_informant_window This is a new slot in rc_informant instances, holding the window object in which they are drawn. -- -- rc_islive_window_object(win) -> boole This procedure, newly defined in LIB RC_WINDOW_OBJECT recognizes window objects which still have associated windows that have not been destroyed. -- -- SETWINDOW This is a new syntax word which can be used as an abbreviation for -> rc_current_window_object -- 16 Sep 1999 Improvements to LIB * rc_buttons -- -- Formats for different sorts of buttons Previously there were three main formats for buttons. Action buttons had a border with rounded corners, which changed colour when pressed. Blob buttons are action buttons with an additional blob to the left of the button label. All the other types of buttons, e.g. toggle buttons, counter buttons, someof buttons, radio buttons, used to have a rectangular boundary composed of three nested rectangles. This could sometimes look messy. So following advice and help from Brian Logan this has been changed. o Toggle and counter buttons have an open rectangle to the left of the label. Toggle buttons also have a boolean value indicator (toggled by mouse button 1) and counter buttons have a numeric value indicator (decreased or increased using mouse button 1 or 3.) o Radio buttons have a circular blob to the left of the label o Someof buttons have a solid square to the left of the label The format used to indicate the different types of buttons other than action buttons depends on these methods NB THIS FORMAT WAS CHANGED LATER. SEE 16 Jun 2000 define :method rc_draw_button_type(pic:rc_counter_button, x, y, offset, height, width, colour); define :method rc_draw_button_type(pic:rc_toggle_button, x, y, offset, height, width, colour); define :method rc_draw_button_type(pic:rc_radio_button, x, y, offset, height, width, colour); define :method rc_draw_button_type(pic:rc_someof_button, x, y, offset, height, width, colour); The methods are invoked by define :method rc_draw_border(pic:rc_display_button, colour); For full details see LIB * RC_BUTTONS These changes necessitated some buttons to have their labels shifted slightly to the right to make space for the type indicator. This is done by the methods define :method rc_offset_print_button_label(pic:rc_button, stringx, stringy, label); define :method rc_offset_print_button_label(pic:rc_display_button, stringx, stringy, label); define :method rc_offset_print_button_label(pic:rc_invisible_action_button, stringx, stringy, label); Now invoked in the method define :method rc_draw_button_string(pic:rc_button, blob_rad, border, width, height); These changes should improve the appearance of many types of panels produced using rc_control_panel, and will also give programmers more control over the appearance, since if desired a different sort of frame can be drawn to indicate button type, instead of a type indicator to the left of the label. -- -- Event handling in buttons When buttons are invoked, the default is to run the corresponding procedures using external_defer_apply, unless [POPNOW ...] is used to specify the action. Using external_defer_apply reduces the risk of problems due to a garbage collection being triggered during a callback. However, it also means that the dlocal variable binding context of the callback procedure is no longer active when the button action is run. This previously caused some obscure bugs, e.g. because the variable rc_current_window_object was not set to the window object in which the button was activated, and also because that variable was sometimes restored to the wrong value after the button action was performed. Those problems have been fixed (I hope) by changes in LIB RC_BUTTONS especially in the procedure rc_async_apply, defined there. -- 13 Sep 1999 Various changes in the last three weeks -- -- LIB rc_procbrowser, rc_lispbrowser, LIB ved_procbrowser The procedure rc_procbrowser, which can be invoked by ENTER procbrowser is a programmer development tool. It produces a list of procedure headers in the current Ved file and displays them in a scrolling text window in a panel with buttons for doing various things that are useful during program development, or while browsing a program file. In a lisp file the enter command will instead invoke rc_lispbrowser, defined in LIB rc_lispbrowser. -- -- Introduced define :rc_defaults for setting defaults This allows global variables to be given a default value if they don't already have a value. E.g. see LIB rc_procbrowser, which now uses this. -- -- Allowed {font } to work for buttons in rc_control_panel This sort of feature specification was previously ignored (though not intentionally!) -- -- LIB rc_font redefined. This used to save integers, which caused problems on the latest version of digital Unix (on alphas). So instead it saves XptDescriptors. -- -- TEACH RC_ASYNC_DEMO much improved Shows how to make a collection of panels, with asynchronous modifications to a running program started by one of the panels. -- -- Button event handling in LIB RC_BUTTONS improved Made handling of action buttons with a procedure and with a list more consistent, and also event handling inside and outside Ved/Xved. In particular the procedure rc_async_apply needed further fixing. -- 26 Aug 1999: Made the RCMENU package available. Converted the old Pop-11 "menu" package (Recursive Hypermenus) which used to use Propsheet (see REF PROPSHEET), and no longer requires it. This means that the menu system is now completely independent of motif and can be used with linux poplog even if motif is not available. The new version is called "rcmenu" instead of "menu", and, is normally available via ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/rcmenu.tar.gz or http://www.cs.bham.ac.uk/research/poplog/rcmenu.tar.gz If installed properly it is made "active" by the command uses rcmenulib after which the "ENTER menu" or "ENTER menu " command should work. See HELP VED_MENU -- 25 Aug 1999: menu_choosefile1 and menu_choosefile2 These have been written to work without propsheet (or motif). menu_choosefile1 invokes rc_getfile menu_choosefile2 invokes rc_browse_files Several other small changes to make the rcmenu package independent of Propsheet. -- 17 Aug BUTTONS: Bug fixes and minor changes Changes made to the event handling in buttons in the week starting 9th August 1999 caused some aspects of event handling by action buttons to go wrong. This has now been fixed. In LIB * RC_BUTTONS Replaced rc_hide_menu with rc_hide_panel, rc_kill_menu with rc_kill_panel. The replaced procedures remain available, but should eventually be phased out of libraries and documentation files. Introduced the following global vars async_vedbuffer = 'output.p'; Make it false to stop action button output going to a Ved buffer. Introduced rc_async_apply(proc) for procedures invoked by action buttons. Still needs some rationalisation. These old autoloadable libraries are now not needed, but are left in case they are still used somewhere: rclib/auto/async_apply.p rclib/auto/async_compile.p -- 11 Aug 1999: LIB rc_browse_files extended. Added extra actions to the browser panel. Still more options possible. Also changed so that if recurse action is invoked and filter has not been changed, the filter becomes nullstring, i.e. match anything. I.e. filter in one directory is not automatically transferred to another. --- Aug 10 1999: change to LIB rc_getinput, TEACH rclib_demo.p Added two global variables global vars rc_default_textin_width = 300, rc_default_numberin_width = 100; Made some changes to teach rclib_demo.p to reflect new features allowing "symbolic" screen coordinates. -- Aug 10 1999 Updater of rc_current_window_object less fussy Changed so as not to attempt to restore window whose container is dead. -- 10 Aug 1999 Allowed use of symbolic, and negative, screen coordinates Changed rc_new_window_object, and therefore its derivatives, such as rc_control_panel, rc_poster, rc_message, rc_display_strings (a) to allow screen coordinates to accept negative x or y coordinates, to refer to right hand side or bottom of screen, for non-embedded panels, and also to allow "left", "middle", "right" and "top", "middle", "bottom", as screen coordinates. These two are no longer lconstant rc_get_current_globals(window); rc_save_window_object(win_obj); Fixed bug in rc_scrolltext for case where window shows only one row and slider on right could cause a mishap at bottom of range. -- 8 Aug 1999 rc_control_panel extended and help file improved Extended rc_control_panel to allow an optional extra argument which is a newXXX procedure for creating a window object. This is then passed on to the call of rc_new_window_object. The default is to use newrc_panel to create an instance of class rc_panel Considerably improved HELP RC_CONTROL_PANEL -- 1 Aug 1999 Event handling improved Some earlier changes, using external_defer_apply to protect users from invoking dangerous Pop-11 callbacks in the wrong context were done badly. As a result, mouse event handling was often a bit slow and sticky, and it became more difficult to use action buttons asynchronously to change the processing of a program launched via an action button. This has now been fixed, as follows: 1. None of the basic event handlers in rc_mousepic.p directly calls external_defer_apply by default. 2. Action button handlers DO now invoke external_defer_apply by default, except for actions specified as [POPNOW ...]. See HELP RC_BUTTONS There is a new teach file TEACH RC_ASYNC_DEMO, illustrating the mechanisms. Various other help and teach files have been improved. Revision of the documentation remains an ongoing process. HELP RC_LINEPIC still needs to be brought up to date. -- 28 Jul 1999 improved HELP RC_CONTROL_PANEL including giving clearer information about SOMEOF and RADIO button fields. -- 25 Jul 1999 rc_make_draggable changed It now makes sure that the object being made draggable is mouse motion sensitive. -- 5 Jul 1999 "Close" action on windows As suggested by Anthony Worrall o LIB rc_window_object has been altered so that window objects can be closed by the "close" option in the window manager, e.g. the f.delete function in twm, tvtwm, ctwm, or "close" in olwm o LIB rc_slider and LIB rc_mousepic modified to work on older versions of Poplog (before V15.5) -- 27 Jun 1999 Altered rc_redraw_panel to fix obscure dlocal bug which could sometimes cause errors. -- Jun 1 1999 altered LIB RC_SCROLLTEXT Introduced rc_scroll_slider_type, rc_scroll_slider_default_type, and made the default for the sliders type "panel" -- 30 May 1999 Various fixes in code and documentation Improved and reorganised documentation in TEACH RCLIB_DEMO.P HELP RC_CONTROL_PANEL -- -- Sliders Fixed obscure bug when panels are used for slider blobs. See the revision notes in LIB RC_SLIDER. The help file still needs updating to illustrate rc_panel_slider, though new facilities are illustrated in the above two help files. Search for 'rc_panel_slider' and for '{type panel}' -- -- Event handling Changed LIB RC_MOUSEPIC so that now all the event handlers are given to external_defer_apply, by default. The risks of problems, e.g because a garbage collection is triggered by a callback, are too great. Users who so desire can add other handlers. -- -- rc_new_window_object and sub-panels and panel motion rc_newindow_object has been changed so that if a container is specified and the container is not big enough it will be automatically enlarged, to the right or downwards, using the current background colour. The procedures for accessing and updating location of windows have been modified to work either for windows inside other windows or top level windows, e.g. rc_coords, rc_move_to, rc_move_by. For contained panels, these (unlike rc_window_location) give or change the origin of the sub-panel relative to the container, using the rc_graphic origins and scales in both. -- -- rc_widen_window_by and rc_lengthen_window_by The two autoloadable procedures rc_widen_window_by and rc_lengthen_window_by have been extended to allow an integer to be the colour, e.g. the result of rc_background or rc_foreground. -- -- rc_warp_to LIB * RC_WARP_TO has been slightly generalised. If the "widget" argument is false, then the mouse motion coordinates are interpreted as "changes" relative to current location. (could be called rc_warp_by) [This could probably improved further if I had better information on what XWarpPointer does. See the MAN file. Offers of improvements welcome.] -- 26 May 1999 Sliders with panels, more on nested panels LIB * RC_SLIDER has been changed in two ways: The procedure rc_panel_slider is like rc_slider, taking the same arguments and the same optional arguments, except that it produces a slider which has a movable rectangular panel instead of an instance of rc_linepic_movable. This removes the need to use a white background for the moving blob to have its intended colour. rc_panel_slider( x1, y1, x2, y2, range, radius, linecol, slidercol, strings) -> slider; In addition a global variable is provided rc_panel_slider_blob whose default value is FALSE, but whose effect if true is to make all sliders use rectangular opaque panels for their "blobs". For some orientations this can look messy compared with the older standard circular blobs. rc_control_panel has been changed so that in a SLIDERS field you can have {type panel} in the field properties to indicate that the new type of sliding panel should be used. Nested moving panels created by rc_new_window_object and rc_control_panel have now been documented, with examples, in TEACH RCLIB_DEMO.P and HELP RC_CONTROL_PANEL. Search for sub-panel. The latter also shows how to create abutting control panels in a single window. The procedures rc_new_window_object, rc_control_panel and many procedures based on them can now take an optional extra "container" argument, a pre-existing panel created by one of these procedures. In that case the new panel/window is inserted into the old one, and the coordinates (x, y) are used to define a location in the old one. The rc_graphic conventions are supported. I.e. the numbers are interpreted as rc_graphic coordinates in the old panel, and the rc_graphic origin in the new panel is located at the specified place. The methods rc_move_to and rc_move_by have been extended to apply to rc_window_object windows, whether they are inside another window or simply on the root window (the screen). Likewise the methods rc_picx, rc_picy, rc_coords (including their updaters) which previously worked only for instances of rc_linepic, now also work for instances of rc_window_object. The new method rc_container_xy(w:rc_window_object, x, y) -> (x, y); is given coordinates (x,y) in a window object and returns the corresponding location in the container object. Additional new methods are: rc_transxyout_in(w:rc_window_object, x, y) -> (x, y); rc_transxyin_in(w:rc_window_object, x, y) -> (x, y); These generalise the versions without the '_in' suffix by giving the result that would have been achieved had the window w been the current window object. Also new: To find the pixel location of the origin of a window in its container use: rc_window_xyorigin(win_obj:rc_window_object) -> (x, y); -- 26 May New procedures/methods for sub-panels rc_coloured_panel( x, y, width, height, colour, contents, container) -> panel; rc_make_draggable(win_obj:rc_window_object, button, xloc, yloc); Two procedures that can be used in "Action" buttons: define rc_hide_panel(); rc_hide_window(rc_active_window_object) enddefine; define rc_kill_panel(); rc_kill_window_object(rc_active_window_object) enddefine; -- 19 May 1999 nested window objects, and ARGS Using the fact that rc_window_object instances now include a composite shell, allowed one of them to contain another. This is based on allowing a lot of panel/window creating procedures to take a previously created panel as an optional extra argument, i.e. rc_new_window_object, and also many others which use it: rc_display_strings rc_browse_files rc_getfile rc_popup_strings rc_getinput rc_readline rc_vedfileselect rc_confirm rc_popup_panel rc_control_panel Also added LIB * ARGS, which defines a macro making it easy to define procedures with optional extra arguments. -- 18 May 1999 Yet more facilities based on or related to rc_scrolltext See HELP RCLIB and HELP RC_SCROLLTEXT, for more details. LIB * RC_DISPLAY_STRINGS Use rc_scrolltext and rc_control_panel to display text strings in a scrolling text panel, allowing interaction via a selected string. LIB * RC_POPUP_STRINGS Uses rc_popup_panel to present a scroll text panel displaying a list or vector of strings LIB * RC_BROWSE_FILES Uses rc_display_strings and rc_scrolltext, to display filenames in a versatile new kind of file browser. LIB * RC_TESTBROWSER Provides a simple pop-11 procedure for invoking rc_browse_files with some default arguments. LIB * VED_BROWSER Provides a way of invoking rc_browse_files using a VED command LIB * FILES_MATCHING Produce a vector of file and directory names matching a pattern. auto/is_pattern_string.p auto/max_string_length.p auto/rc_browser_action.p auto/rc_vedfileselect.p lib/rc_scrolltext.p lib/rc_window_object.p teach/rclib_demo.p -- 8 May 1999 rc_popup_panel added, and things based on it, e.g. rc_popup_strings, rc_getfile. For more information see HELP RCLIB/rc_popup_panel HELP RCLIB/rc_popup_strings HELP RCLIB/rc_getinput HELP RCLIB/rc_getfile HELP RCLIB/rc_confirm HELP RCLIB/rc_do_unix HELP RCLIB/rc_readline HELP RCLIB/rc_xterm -- 8 May 1999 Strings in rc_scrolltext panels can now be dragged This is often easier than using scroll bars. (Compare PDF). -- 8 May HELP RCLIB updated -- 1 May 1999 Clickable sliders and other utilities Made sliders have a click-sensitive invisible action button along their length, so that value can be changed by clicking instead of sliding. The click-sensitive area is approximately but not exactly rectangular. HELP * RC_SLIDER gives details This autoloadable procedure is available to users. rc_between(val, v1, v2) -> boolean In LIB * RC_SLIDER constrain_between is now accessible to users. constrain_between(val, v1, v2) -> val; The result is always between v1 and v2. -- 1 May 1999 LIB RC_BUTTONS includes "invisible" action buttons Added class and methods for "invisible" action button HELP * RC_BUTTONS updated search for "invisible" Added variables rc_action_button_x, rc_action_button_y for use in action buttons. (Not reliable when DEFER is used in actions.) -- 29 Apr 1999 LIB RC_WINDOW_OBJECT has composite widgets Fixed bug in width/height of panel creation procedure. Added XptNewPanel and xt_new_panel. Made window objects contain shell+composite widget+ graphic widget. This is in preparation for allowing them to contain more than just a graphic widget. The use of a composite widget allows windows also to contain scrolltext widgets (to be added to RCLIB soon). -- 19 Apr 1999 More abbreviations allowed for button properties Allowed the numerical increment in a counter button specification to be replaced by a two or three element vector giving increment, minimum and possibly maximum value for the button. Allowed vectors or lists describing toggle and counter buttons to have an extra field giving featurespecs. Allowed featurespec keys for buttons to be abbreviated, via the user-modifiable property rc_button_spectrans -- 18 Apr 1999 Linking fields now much easier in rc_control_panel A new notation has been implemented for specifying that one field is linked to another. The notation, using {reactor [...list...]} is illustrated in TEACH RC_CONSTRAINED_PANEL and HELP RC_CONTROL_PANEL Added rc_update_field, rc_update_fields, and panel_update Made updaterof rc_field_item_of_name always update the informant_contents, not the contents. The previous definition was an aberration. To enable the above. In LIB RC_INFORMANT, altered rc_information_changed to cope with the case where the rc_informant_reactor contents is a list of vectors. For most fields in rc_control_panel "fieldbg" should be used instead of "bg" to specify the field's background colour. Likewise "fieldfg" instead of "fg" for text fields, etc. -- 16 Apr 1999 TEACH POPCONTROL Shows how to create a control panel setting various Ved and pop-11 boolean and numerical control variables. -- 13 Apr LIB RC_BUTTONS, counter buttons added rc_counter_min and rc_counter_max slots. -- 11 Apr 1999 Various additional improvements and bug fixes HELP RC_CONTROL_PANEL Now has a lot more information about permitted button formats TEACH RC_CONSTRAINED_PANEL Has had new examples and exercises added, e.g. showing how to link a counter button to a slider, and how a program can update the current selection in RADIO and SOMEOF fields. LIB RC_CONTROL_PANEL Has been extended with more utilities There is now an updater for info -> rc_field_info_of_label(panel:rc_panel, label); to handle RADIO and SOMEOF fields. the updater of rc_field_item_of_name has been made to handle display buttons (e.g. counters, toggles, radio buttons, etc.) properly. (Needed for TEACH rc_constrained_panel examples.) LIB RC_TEXT_INPUT Previous "fix" to make it always show the correct number of decimal places produced some anomalies while editing the input panel. Now fixed. LIB RC_BUTTONS Made updaterof val -> rc_informant_value(button:rc_display_button); redraw the button, except when creating_button. This makes the example in TEACH RC_CONSTRAINED_PANEL work. Added updater for rc_options_chosen: options -> rc_options_chosen(buttons); Useful for programs which change displayed selections for RADIO and SOMEOF buttons. -- 9 Apr 1999 New features and documentation: control panels, sliders Sliders have a number of new features associated with the new default allowing the numeric display to be a text input field. The current system is fully (??) documented in HELP RC_SLIDER. As a result of these changes there are now new keywords allowed for controlling the format of sliders in connection with rc_control_panel. See HELP RC_CONTROL_PANEL There are also changes to rc_control_panel to make it much easier to extend the facilities. However, everything should be backward compatible. -- 6 Apr 1999 Added sliders with text input fields Made the default to build sliders with number input fields Can be restored to previous version by setting slot rc_slider_textin false. Consequently removed the NUMBERIN panel from rc_polypanel -- 4 Apr 1999 Many changes to rc_control_panel, sliders, buttons, text input etc. LIB RC_SLIDER totally reorganised. Improved mapping from position to value in sliders. Make all drawing caused by moving go via updating of slider value. Introduced slider_value_from_coords, slider_coords_from_value, constrain_between. Examples in TEACH RC_CONSTRAINED_PANEL LIB RC_BUTTONS Added rc_set_button_defaults for setting defaults for radio or someof buttons. Used in rc_control_panel. Made the reactors for radio and someof buttons set the values of the field identifiers, if they exist. Alter rc_polypanel to use this. Also allowed default settings of radio and someof buttons to be set up by rc_control_panel. Altered rc_polypanel to use new facilities. LIB RC_TEXT_INPUT Made text panel use variable value if appropriate. Fixed updater of rc_informant_value to update text value. Included rc_pr_places slot in rc_number_input. Allowed input checking to use "round" constraint or rc_pr_places --- Aaron Sloman, Mar 30 1999 Changed to allow negative numbers! -- 30 Mar 1999 Many changes. TEACH RC_CONSTRAINED_PANEL Old version can be got by doing lib oldrclib instead if uses rclib Changes involved quite a lot of reorganisation, mainly to simplify use of rc_control_panel, e.g. by associating identifiers with changeable fields or by attaching constrainers or reactors,using field specifications in this format: {ident } {constrain } {reactor } The main new phenomena are illustrated in a new file TEACH RC_CONSTRAINED_PANEL -- 24 Mar 1999 Altered rc_polypanel Using other new developments, altered rc_polypanel so that a NUMBERIN field can be used to set the number of sides. -- 24 Mar 1999 Further extensions to input fields Allowed text and number input fields to be associated with a variable or identifier, using the {ident } property feature. Extended property keywords in rc_control_panel, supporting {ident ...} {labelstring ...} {labelcolour ...} {labelfont ...} Changed computation of minimal offset to allow full label to be printed. Changed several documentation files to display new features, e.g. TEACH RCLIB_DEMO.P HELP RC_TEXT_INPUT HELP RC_CONTROL_PANEL -- 22 Mar 1999 Extended number input and text input fields Allowed the procedure create_text_input_field to have a list as its fifth (value) field, instead of just a string or number. The list can specify a label and various new defaults for the panel. Altered rc_control_panel to accommodate a such a list instead of just a string or number value. Modified examples and documentation in TEACH RCLIB_DEMO.P HELP RC_TEXT_INPUT HELP RC_CONTROL_PANEL -- 21 Mar 1999 Documented new features in rc_control_panel Some features added previously but never documented have been documented in HELP RC_CONTROL_PANEL, especially the permitted panel property specifications: offset xorigin yorigin yscale xscale -- 16 Mar 1999 Added rc_draw_coloured_square -- 25 Feb 1999 text and number input fields in rc_control_panel Bugs in the way width and height specifications were interpreted in TEXTINPUT and NUMBERINPUT fields in rc_control_panel have been fixed. More varied examples of these and step values have been added to various documentation files, including HELP RC_CONTROL_PANEL, TEACH RCLIB_DEMO.P TEACH RC_CONTROL_PANEL, HELP RC_SLIDER -- 24 Feb 1999 Step values allowed for sliders LIB RC_SLIDER has been extended by adding a field rc_slider_step to the slider class. Its value should be a number. If it is 0 it is ignored. If not it constrains the minimum step size of a change in slider value. The procedures in LIB RC_SLIDER and also LIB RC_CONTROL_PANEL have been extended to allow the "range" argument for a slider to be a four element vector: min, max, default and step. Also rc_control_panel now allows a {step } property for a slider field. All the sliders in the field will then have that step value. -- 21 Feb 1999 Two new procedures for drawing coloured objects rc_draw_coloured_circle(xcentre, ycentre, radius, colour, linewidth); rc_draw_coloured_pointlist(pointlist, colour, linewidth, closed); See HELP * RCLIB for details or both (or SHOWLIB). 1998 -- 15 Sep 1998 rc_coloured_circles Added new auto-loadable library defining rc_coloured_circles(xcentre, ycentre, radius, thickness, inc, colours); See HELP * RCLIB/rc_coloured_circles LIB * rc_coloured_circles -- 24 Feb 1998 extended rc_control_panel Added rc_panel_objects(panel), allowing [GRAPHIC ...] fields which create objects to know about them. Added rc_redrawing_panel. Made true after first time panel is redrawn. Fixed re-drawing of sliders in rc_redraw_panel Moved command to prevent scaling of slider field size specs to rc_redraw_panel -- 24 Feb 1998 Allowed freezable objects to be redrawn after freezing -- 8 Feb 1998 Even more changes to rc_control_panel and sliders Changes to make it independent of sign or magnitude of xscale and yscale Changes to fix location of backgrounds in fields relative to contents of fields. Changes to handle {spacing } properly Introduced new {width panel} spec format for sliders. Dlocalised rc_foreground while each field is being drawn, to prevent change of foreground colour. Changes to sliders Made location and size of value panel independent of scale Make the px and fx values in slider value panel additive. Introduced slot rc_slider_scaled, made false in rc_control_panel Added scaled argument to rc_draw_slider_strings Made other changes to ignore scale when rc_slider_scaled field is false. (Default is true). -- 6 Feb 1998 More changes to buttons and rc_control_panel LIB * RC_BUTTONS Slightly increased spacing round blobs in blob buttons. LIB * RC_CONTROL_PANEL Altered {width } for sliders to refer to total width including label on right. -- 4 Feb 1998 rc_draw_unscaled_blob See LIB * RC_DRAW_UNSCALED_BLOB Always draws blob with the specified radius, no matter what rc_xscale, rc_yscale. Further fixes to rc_control_panel -- 3 Feb 1998 rc_buttons and rc_control_panel updated Several changes were made to rc_control_panel to give users more control over the format. New field spec behaviour in rc_control_panel {margin } Now can be used with all fields except GRAPHIC fields, to added a margin above and below the items. The integer is the pixel width of the margin. {fieldbg } This specifies the colour of the background to the field. It is painted across the full width of the control panel area (e.g. excluding any offset to the left) rc_message_wait modified. The button event handler added to the window displayed by this procedure now calls interrupt if it is invoked from another event handler. This seems to be needed to restore the state properly after hibernating. However, to prevent it interrupting if the procedure is directly invoked by a pop-11 program the global variable rc_in_button_handler is used to tell how the procedure was invoked. This required a change to the button_1_up event handler in LIB * RC_BUTTONS to make it set this variable true. Documentation in HELP * RC_BUTTONS fixed to explain this and to correct some old documentation bugs. E.g. rc_button_info no longer exists. TEACH * RC_CONTROL_PANEL and HELP * RC_CONTROL_PANEL updated. TEACH * RCLIB_DEMO.P extended and clarified. LIB * RC_POLYPANEL slightly modified to make use of new formatting options in rc_control_panel -- 25 Jan 1998 New demo: game connect4 Added: $local/rclib/demo/aze.connect4.p This is a student program written by Athina Economou to play the game of Connect4. To examine it do ENTER rcdemo aze.connect4.p The follow the instructions given near the top of the file. 1997 -- 29 Nov added rclib/demo/rc_neural.p -- 28 Nov 1997 Changed sign in y coord for slider labels LIB * RC_SLIDER has changed so that the y value for slider labels is positive upwards, not downwards. Uses of RC_CONTROL_PANEL also have to change. -- 18 Nov 1997 ADDED LIB * RC_FREEZABLE For points which can be moved once and then freeze themselves. (Incomplete documentation in the LIB file.) -- 17 Nov 1997 RC_SLIDER and RC_CONTROL PANEL handle idents better LIB * RC_SLIDER modified Allowed rc_slider to take an extra argument which is a word or an identifier to go into the rc_informant_ident slot. Introduced create_rc_slider_with_ident which is like create_rc_slider except that it takes an extra word or identifier as value. Extended slider syntax in rc_control_panel to allow a word or identifier to be first element of the list for each slider. Still to be documented! -- 14 Nov 1997 RC_CONTROL_PANEL bug fixed The {align panel} option did not work properly. Now fixed. -- 10 Nov 1997 RC_CONTROL_PANEL revamped The coordinates and distances in the panel specification have been made scale and origin independent so that multi-scale graphics can be combined with unscaled buttons, sliders, etc. -- 8 Nov 1997 RC_BUTTONS numeric parameters rationalised so that all the specifications are relative to top left corner of the button or button array, and scale independent. See HELP * RC_BUTTONS Also new methods introduced. define :method rc_draw_button_background(pic:rc_button, mid, border, blob_rad, width, height); define :method rc_draw_button_string(pic:rc_button, blob_rad, border, width, height); define :method rc_draw_border(pic:rc_display_button, colour); define :method rc_draw_button(pic:rc_toggle_button); -- 6 Nov 1997 Made rc_drawline_absolute round its inputs Too many other things would otherwise have to do the rounding. -rw-r--r-- 1 axs 1170 Nov 8 15:36 auto/rc_drawline_relative.p -- 4 Nov 1997 Various changes to sliders and rc_control_panel -- -- SLIDERS See LIB * RC_SLIDER Changed to allow a frame to be drawn around the bar, and to allow the ratio of blob size to width of bar to be controlled by users. Replaced slot rc_slider_linecol with rc_slider_barcol Added slot rc_slider_barframe (value a pair containing a colour and a line thickness). Introduced several new _def global variables for default values E.g. rc_slider_blobradius_def = 5, rc_slider_blobcol_def = 'red', rc_slider_barwidth_def = 5, rc_slider_barcol_def = 'black', rc_slider_barframe_def = false, Introduced rc_slider_blob_bar_ratio default 1.5 Determines ratio of blob diameter to bar thickness. Made printing in the value panel sensitive to whether the number can be negative or not. I.e. starts further right if room is needed for '-' sign. Changed the line drawing procedures. Started writing HELP * RC_SLIDER LIB * RC_SQUARE_SLIDER. Introduced rc_slider_square_thickness_def -- -- RC_CONTROL_PANEL See LIB * RC_CONTROL_PANEL, HELP * RC_CONTROL_PANEL, Made it possible to specify sliders with frames surrounding the slider bars. Introduced these panel field slots and their default values, rc_slider_field_barframecol, rc_slider_field_barframewidth rc_slider_field_barcol rc_field_override_specs Added new options for slider properties. {framecol 'string'} {framewidth } Gave rc_field_item_of_name an updater Updated HELP * RC_CONTROL_PANEL to illustrate sliders with -- 10 Sep 1997 TEACH FACES, HELP RCLIB errors corrected TEACH * FACES is a new draft introduction to Pop-11 and Ved using the graphical facilities. The file HELP * RCLIB had incorrect definitions of rc_draw_rect, rc_draw_Rrect, rc_draw_square, rc_draw_Rsquare All were described as being drawn centred at the (x, y) location, when in fact the given coordinates are of the "top left" corner of the square or rectangle. Compare these two HELP RCLIB/rc_draw_centred_rectangle HELP RCLIB/rc_draw_centred_square -- 7 Sep 1997 rc_move_to and rc_move_by extended The rc_move_to and rc_move_by methods have been extended so that they can be applied to instances of rc_window_object. -- 5 Sep 1997 isrc_window_object new file LIB * ISRC_WINDOW_OBJECT provides temporary definitions of isrc_window_object and method rc_widget for use in utilities that don't need to load rc_window_object, e.g. LIB * RC_CHECK_WINDOW -- 3 Sep 1997 rc_blocks Fixed a bug in LIB RC_BLOCKS which occasionally caused mouse events to be interpreted in the wrong coordinate frame. -- 2 Sep 1997 rc_popup_query, TEACH rclib_demo.p , rc_print_strings Fixed rc_popup_query so that if you move mouse off a "select" button with button down then release mouse, the select button goes back to "off" state. Extended TEACH * RCLIB_DEMO.P to include more examples including text input, using rc_popup_readin and rc_popup_readline Added global variable rc_print_strings_offset (default = 2) for space to left and right of strings printed in rc_print_strings and its derivatives, e.g. rc_poster, rc_message, rc_message_wait -- 28 Aug 1997 rc_sole_active_widget rc_message rc_message_wait Modified LIB * RC_MOUSEPIC Introduced rc_sole_active_widget (default false). If this is non-false, then its value should be a widget and only events in that widget will be handled. Now used in rc_popup_query and rc_message_wait. Also rc_popup_readin and rc_popup_readline. Altered rc_message so that if rc_message_instruct is false, no instructions are included in the panel. Altered rc_message_wait so that if rc_message_wait_instruct is false, no instructions are included in the panel. Also altered rc_message_wait so that it can be invoked from an action button and made to wait. -- 18 Aug 1997 rc_popup_readin, rc_popup_readline These two procedures use rc_text_input mechanisms to define a panel that pops up a question then waits for you to type in a string or a number, or a line of text. For examples see HELP * RC_TEXT_INPUT/rc_popup_readin HELP * RC_TEXT_INPUT/rc_popup_readline -- 17 Aug 1997 rc_interpret_key, rc_text_input rc_interpret_key(code) -> key; For reacting to keys in keypress sensitive windows. See HELP * RC_KEYCODES, which has been much extended. Also LIB * RC_INTERPRET_KEY for default mappings HELP * RC_TEXT_INPUT describes a text input field. For details see LIB * RC_TEXT_INPUT. This includes a version that is restricted to number input. LIB * RC_CONTROL_PANEL has been extended so that new fields are allowed: TEXTIN and NUMBERIN. For examples see HELP * RC_CONTROL_PANEL/TEXTIN Changed LIB * RC_BLOCKS to use rc_defer_apply when drawing. Fixed a bug in rc_drawline_relative. It was not converting the width argument according to the scale. -- 15 Aug 1997 rc_default_window_object, rc_query_mouse Had to dlocalise more rc_ globals to prevent corruption of current window objects when the default window is first created. rc_query_mouse() -> (x,y); Returns current screen coordinates of mouse pointer (or possibly undef,undef) Found a bug in $popautolib/uses_lib_idents.p which caused problems when "uses" was used with a library that loads an active variable, e.g. rc_default_window_object. The fix is to replace isundef(valof(idname)) with isundef(nonactive_valof(idname)) -- 10 Aug: event handling in movable objects Problems revealed in testing the example of demo_panel5 in HELP * RC_CONTROL_PANEL made it necessary to look again at the event handling to ensure that if a button-triggered event occurred while drawing was going on this did not interfere with the drawing. For some obscure reason one of the problems turned out to be fixed by changing LIB * RC_POINT to use rc_line_width (which caches the value of rc_line_width). In the course of tracking that down some other changes were made. In particular if the value of the rc_pic_lines slot of a drawable picture object is a procedure, instead of simply being run, with access to the value of rc_current_picture_object, which occasionally may be the wrong thing, the procedure is now applied to the picture object directly. This necessitated some changes in LIB * RC_LINEPIC This meant that a number of picture drawing procedures in other libraries also had to be changed, including rc_DRAWBUTTON in LIB * RC_BUTTONS rc_draw_slider_mover in LIB * RC_SLIDER rc_DRAWPOINT in LIB * RC_POINT Also, in LIB * RC_MOUSEPIC there is a new version of method rc_move_to for rc_selectable picture objects. This assigns the picture object locally to a global variable rc_moving_picture_object so that it is possible for a procedure dealing with an attempt to drag an object to tell whether the object is already moving, and vice versa. This allows objects moving under program control to be dragged to a new position without messing up the picture, though the effect of dragging may be deferred a bit. The result is a somewhat cleaner and more reliable system, which also reduces the necessity for using DEFER actions in buttons. This also made possible slight simplification in LIB RC_POPLYPANEL, e.g. fewer DEFER actions are needed. -- 6 Aug: event handling in movable objects Altered LIB * RC_MOUSEPIC so that if an event occurs involving a picture object that is currently being (re-)drawn i.e. is in the variable rc_current_picture_object, then the event handling is deferred until after the drawing is finished. Extended HELP * RC_CONTROL_PANEL HELP * RC_BUTTONS -- 4 Aug: rc_check_window Added autoloadable rc_check_window(win) where win is a window object or widget. Changed various procedures to call rc_check_window, e.g. rc_foreground, rc_background, rc_line_width, rc_font (rc_linefunction, defined in LIB * RC_GRAPHIC) should probably also be altered to use this check. -- 3 August: "square" sliders Changed rc_square_slider so that movable blob is replaced by a square with a diagonal cross. Changed LIB * RC_POLYPANEL to use square sliders. Changed rc_control_panel so that a SLIDERS field can include a property of the form: {type square} -- 3 August: event handling Further work on event handling in LIB * RC_MOUSEPIC, to prevent rc_current_window_object to be left with the wrong value (which previously caused control panels to become unusable.) Fixed bug in keyboard keypress handling, so that example in TEACH * RC_LINEPIC now works again. Made LIB RC_MOUSEPIC more modular. Several of the main procedures are now vars so that they can be traced, etc. Extended documentation of event handling, and event types in HELP RC_LINEPIC LIB * RC_SLIDER changed so as not to make windows by default sensitive to anything other than button and motion events. -- 3 August: control panels and buttons Added rc_reset_panel(panel) to reset frame coords for a control panel. Puts the origin at top left, with xscale and yscale both set to 1, so that buttons etc work properly. Allowed {events } to specify types of events a panel can respond to. ENTER killwin This command, or ved_killwin() is equivalent to rc_kill_window_object(rc_current_window_object); so to kill a window object click on it with left button, while holding CTRL key down, then do ENTER killwin. Rewrote HELP * RC_CONTROL_PANEL Added GRAPHIC field type to rc_control_panel. See examples in the help file and also TEACH * RCLIB_DEMO.P Extended the property descriptions in control panel fields, including things like {align centre} and {align panel} for GRAPHIC fields. These should no longer be used: {centre true/false/centre} instead use {align left/centre/right}. Allowed a field's property specifications on rc_control_panel to be a list, so that different fields can share the same properties without copying. -- 3 Aug rc_scratch_panel Changed the format for rc_scratch_panel -- 3 Aug rc_buttons Changed LIB * RC_BUTTONS so that [POP11 ...] actions and the like are compiled into procedures when the button is created. The procedure is given a name which helps with debugging. -- 25 Jul 1997 rc_control_panel Redefined rc_circle as synonym for rc_draw_circle Changed LIB * RC_POLYPANEL to put slider action buttons on the right. -- 16 July rc_scratch_window Moved tearoff stuff from rc_scratchpad to LIB * RC_SCRATCH_WINDOW Made old windows also full rc_window_objects, so that they can be made current again with CTRL + mousebutton 1. This makes the window both the current scratchpad window and the current window object. There is a new class rc_scratch_window, which is a subclass of rc_window_object, so that it can have its own methods. -- 15 July rc_print_strings Changed rc_print_strings to allow 5th "centre" argument to be false, true or the word "right", for right-adjusted strings. This carries over to all the procedures that use rc_print_strings, including rc_message, rc_message_wait, rc_poster, rc_popup_query All illustrated in HELP * RC_BUTTONS It also allows {centre right} as part of the description language for rc_control_panel (to be documented). -- 11 July rc_scratch_window Added $poplocal/local/rclib/mkrcautolinks to make symbolic links for autoloadable procedures combined in lib files Various extensions. Each new window has a new label, Scratch1, Scratch2, etc., as suggested by Brian Logan Assigning undef to rc_scratch_window makes it forget current window but does not remove it. It could be saved somewhere. rc_tearoff now uses that. The next scratch_window uses sign and location of previous one plus offsets. Introduced global vars rc_scratch_x = 520, rc_scratch_y = 300, rc_scratch_width = 500, rc_scratch_height = 500, rc_scratch_frame = true; See LIB * RC_SCRATCH_WINDOW * RC_SCRATCHPAD -- 11 July rc_buttons and rc_button_type_key Added property linking type word for button specifications to a class key. See LIB * RC_BUTTONS/rc_button_type_key Makes it easier to separate types of buttons into different files. Made mouse sensitive windows become rc_current_window_object if clicked on with mouse button 1+CTRL -- 8 July 1997 rc_informant Introduced new mixin rc_informant in LIB * RC_INFORMANT described in HELP * RCLIB. Provides facilities for picture objects to have an information field and methods for registering change of contents of that field. Used rc_informant_value to replace rc_button_info in LIB * RC_BUTTONS -- 9 Jul 1997 Various generalisations Added updaterof slider_value_of_name(pane, name, num); to LIB * rc_control_panel Added LIB * RC_CHECK_CURRENT_WINDOW Added LIB * RC_SCRATCH_PANEL uses rc_scratch_panel rc_scratch_panel(10,10); LIB RC_INFORMANT introduces a mixin for use with sliders, buttons, etc. that hold some information that can change. The method rc_information_changed can be applied to such objects to invoke more specific methods. See LIB * RC_INFORMANT Changed LIB * RC_SLIDERS and LIB * RC_CONTROL_PANEL to use this mixin. Moved rc_select_button stuff from rc_buttons to LIB * RC_POPUP_QUERY Two new drawing utilities rc_draw_centred_square rc_draw_centred_rect Featurespecs can now have slot names instead of procedures See HELP * FEATURESPEC LIB RC_SLIDER create_rc_slider now introduced as more general create procedure than rc_slider. It has extra fields to allow different blob shapes, introduced LIB RC_SQUARE_SLIDER Extra utilities in rc_control_panel -- 4 Jul 1997 rc_slider, rc_distance, rc_polypanel Finally used the constrained mover facilities described in LIB * RC_CONSTRAINED_MOVER to define a slider class. Illustrated it in in TEACH * RC_CONTROL_PANEL/sliders. A more compelling example is in LIB * RC_POLYPANEL. Added rc_distance. Allowed slider to have a range not starting at 0. Allowed value to be updated by program. Allowed sliders to have automatically updated visible adjacent number fields. Added global variable rc_constrain_slider. If it is true values beyond the slider range don't cause an error: the value is merely moved to the appropriate range bound. Altered the tearoff mechanism in LIB * RC_SCRATCHPAD so that the new sheet is slightly offset from the old one. Added rc_drawline_relative, which is like rc_drawline_absolute except that it respects the current rc_graphic coordinate frame. Moved some of the less useful facilities out of LIB * RC_BUTTONS and into LIB * RC_BUTTON_UTILS -- 30 Jun 1997 rc_control_panel LIB * RC_CONTROL_PANEL provides a powerful new alternative to propsheet, building control panels consisting of text fields and various kinds of button fields, based on LIB * RC_BUTTONS. There is a new syntax (extending that previously used in LIB * VED_MENU) See TEACH * RC_CONTROL_PANEL, HELP * RC_CONTROL_PANEL -- 29 Jun 1997 Extensions to RC_BUTTONS In support of the control panel mechanisms some extensions to LIB * RC_BUTTONS were required, including: Altered syntax for individual button specifications by allowing a list or vector to contain an extra field specifying a feature spec (see HELP * FEATURESPEC) to override defaults for individual buttons a list of button specifications. Allowed buttons with strings as labels to be associated with rc_button_info fields (now rc_informant_value fields) containing other things, e.g. words or numbers. New procedure applicable to a list of "someof" buttons rc_options_chosen(buttons) /* -> (options, ...) */; New procedure for linking a set of radio buttons or someof buttons rc_inform_button_siblings(buttons); Added "nodraw" option to create_rc_button, so that the invoking procedure can create the instance and modify it before drawing. Added slot rc_button_container for all buttons. With this default when the button is created: rc_current_window_object -> rc_button_container(button); -- 26 Jun 1997 DEFER actions, scratch window, control panel, links Extended rc_linked_pic to allow picture objects to specify a coordinate frame in a window object Introduced LIB * RC_SCRATCH_WINDOW and LIB * RC_SCRATCHPAD Introduced simple demo/control.panel.p Introduced DEFER action types for action_buttons -- 22 Jun 1997 Various Changed asynchronous event handling in LIB * rc_buttons to get over problems with handling of postponed Ved actions, e.g. in pop_ui_edittool Made rc_ant_demo use coloured ants. Also a bit more efficient now, and kills the window if interrupted. Allowed rc_popup_query to have the word "numbers" instead of a list of answers. In that case a list of numerical options is automatically generated. If upper case "NUMBERS" is used, and it is not a "someof" panel, then the word "None" is added as an extra option (equivalent to a Cancel option). Added rc_external_defer_apply (user definable) Changed rc_pop_up_query so as not to defer events Extra slot rc_button_info added to mixin rc_button in LIB * RC_BUTTONS Changed rc_blocks to create new parse tree window each time. Easier to control location. Also uses a smaller font. Had some obscure problems with it hanging up. Apparently fixed(?) -- 18 Jun 1997 added XSCALE and YSCALE pic descriptors Altered LIB * RC_LINEPIC to allow rc_pic_lines specifications to include XSCALE and YSCALE. See HELP * RC_LINEPIC/XSCALE and TEACH * RC_LINEPIC/XSCALE Also altered LIB * RC_LINKED_PIC to accommodate this. -- Updated HELP * RC_LINKED_PIC (It had quite a lot of out of date stuff). -- 16 Jun 1997 new mixin: rc_linked_static Altered the updater of rc_window_location so that if a window is enlarged the new area takes on the current background colour (it sometimes came out black). Added mixin rc_linked_static to lib rc_linked_pic, and updated the help file HELP * RC_LINKED_PIC -- 15 Jun 1997 modified rc_redraw_window_object etc. Gave rc_redraw_window_object an extra optional boolean argument. If it is false the window is not cleared before the objects are redrawn. The default is to clear the window first. Removed some redundant button creation procedures from LIB * RC_BUTTONS -- rc_drawline_absolute rc_lengthen_window_by rc_widen_window_by Added rc_drawline_absolute(x1, y1, x2, y2, colour, width); rc_lengthen_window_by(win_obj, len, colour); rc_widen_window_by(win_obj, width, colour); -- 14 Jun 1997 RC_EXTEND_UTILS Introduced LIB * rc_apply_util, to allow rc_window utilities to be applied to window objects, e.g. 'red' -> rc_apply_util(win1, rc_foreground); Introduced LIB * RC_EXTEND_UTILS, which uses the above permanently to change a number of utilities so that they also work with window objects, i.e. rc_extend_utils rc_font, rc_line_style, rc_line_width, rc_line_function, rc_background, rc_foreground, rc_title, ; -- RC_LINKED_PIC Following discussion with Brian Logan, introduced a new mixin rc_linked_pic, in LIB * RC_LINKED_PIC, which allows the same movable picture to be included in several different windows, e.g. using different scales. This required extending LIB RC_WINDOW_OBJECT with the global variable rc_redrawing_window, set non-false only inside rc_redraw_window_object To allow more flexibility in handling the rc_pic_strings slot of a picture, changed LIB * RC_LINEPIC so that instead of using rc_print_at directly, it uses a procedure rc_print_pic_string whose default value is rc_print_at. Changed rc_add_pic_to_window so that if rc_mousepic has not been applied already it is applied to make the window sensitive. Updated HELP * RCLIB and several other documentation files -- 11 Jun 1997 More work on LIB * RC_POINT Extended rc_point class to include rc_point_colour slot. Extended rc_new_live_point to allow point colour to be specified by optional extra string argument before radius. See HELP * RC_POINT -- 10 Jun 1997 Added rc_transfer_window_contents. For copying pictures in one window into another See HELP * RC_TRANSFER_WINDOW_CONTENTS Extended rc_window_object to include rc_event_types slot -- Automatic offsets for new windows Extended rc_window_object to allow rc_new_window_object to have false,false for location values, in which case the previous values are used, incremented by these values global vars rc_window_x_offset = 20, rc_window_y_offset = 20; Altered LIB * RC_MOUSEPIC so that use of shift key to re-select previously selected picture works even when mouse is over a new picture. Also improved dragging behaviour without shift key depressed Fixed bug in rc_point that caused string labels to be wrongly placed with rc_yscale positive and > 1. Improved HELP * RC_POINT Altered rc_new_live_point so that it can take an extra argument a list of the type that can be used in rc_pic_lines to specify an additional drawing in a point. Also allowed points to have rc_point_radius slot in addition to rc_mouse_limit. Extended HELP RC_POINT with examples and fuller explanation -- 20 May 1997 rc_poster rc_message_wait and new teach file Added rc_poster Added TEACH RCLIB_DEMO.P Added rc_message_wait, and updated HELP RC_BUTTONS -- May 4 1997 Buttons extended Added rc_warp_to -- Radio buttons and someof buttons Added radio buttons and someof buttons with examples in HELP RC_BUTTONS, using create_radio_button_columns create_someof_button_columns Added rc_kill_menu: an action that can be used to make a button destroy the current window. Introduced rc_default_window_object to use with things like XpwFontHeight, XpwFontAscent, XpwTextWidth, e.g. in rc_text_area This made it possible to change rc_popup_window and rc_message to work more smoothly, i.e. by computing size of window before creating it, instead of creating and re-sizing rc_message is changed to return a result. Hold onto the result to prevent the garbage collector removing the window. Changed rc_text_area to return measurements in pixel units, not scaled values. Thus they need to be divided by rc_xscale and rc_yscale to get scaled values. This allowed other things to be simplified, e.g. computation of window size required for various text and button items. Added rc_flush_everything, e.g. to clear all output buffers before popping up a menu. -- Apr 27th Buttons finally working, vedreadlinefrom HELP RC_BUTTONS updated. includes option buttons and examples using rc_popup_query with both option menu panels and select menu panels. Required using ved_apply_action to provide context for consveddevice in callbacks. Also made vedediting true in callbacks if vedbufferlist is non empty. --- LIB VEDDISCIN, VEDREADLINEFROM These enable a program to get input from a particular ved or XVed buffer. --- LIB RC_BUTTONS seems to be stabilising with facilities for creating various sorts of buttons, button rows, button columns, and button arrays. Toggle and counter buttons working. Feature specs are now objects that can be passed around the creation procedures to override defaults for individual buttons, or sets of buttons. See HELP FEATURESPEC -- Apr 19th Changes to lib rc_mousepic and rc_window_object A major change is support for entry and exit actions in windows. Introduce entry and exit actions, via new methods rc_mouse_enter(pic:rc_selectable, x, y, modifiers); rc_mouse_exit(pic:rc_selectable, x, y, modifiers); and new slots (in lib rc_window_object) slot rc_entry_handler ="rc_mouse_enter"; slot rc_exit_handler ="rc_mouse_exit"; --- Apr 16 rc_window_object.p introduced new method rc_keypress_handler(pic:rc_linepic),returning false by default. Made rc_kill_window_object first unmap the widget, to deal with "sticky" window managers (like ctwm). rc_new_window_object extended to allow optional newXXX argument Turned rc_realize_window_object into a method, so that subclasses can take extra action. See LIB * RC_BUTTONS -- 15 Apr 1997 rc_title This now also updates the iconName resource. New autoloadable, still being developed. auto/rc_popup_query.p rc_popup_query( x,y, strings, answers, centre, columns, buttonwidth, buttonheight, font, bgcol, fgcol) -> selection; -- 15 Apr 1997 buttons and text fields LIB RC_BUTTONS has been considerably modified. See the examples at the top of the file for new facilities. Documentation on rc_draw_ob fixed. In HELP RCLIB it was wrongly stated that the first two arguments locate the centre of the oblong, rather than the top left corner. Additional autoloadable procedures: rc_message(x,y, strings, spacing, centre, font, bgcol, fgcol); Put up a window with a message. It remains in place till clicked on. rc_draw_bar(x, y, height, len, col); Draw a bar of given height, length and colour starting at x, y (middle of left end). Assume height is relative to current scale as defined by rc_yscale, similarly x, y, and len. rc_print_strings(x, y, strings, spacing, centre, font, bgcol, fgcol) -> (maxwidth, totalheight); Print a list of strings in a box starting at location x,y (top left corner). Full details in HELP * RCLIB/rc_print_strings rc_text_area(strings, font) ->(widths, maxwidth, height, ascent); Given a list of strings, and a font, return a list of text widths, the maximum width required to print the strings, the text height for that font, and the ascent height. Full details in HELP * RCLIB/rc_text_area -- 8 Apr 1997 rc_app_mouse, rc_mouse_coords Moved change notes from HELP RCLIB to HELP RCLIB_NEWS, i.e. this file Introduced the following, with help files LIB * RC_APP_MOUSE HELP * RC_APP_MOUSE Generalises a subset of rc_mouse facilities, and reduces risk of clash with rc_mousepic LIB * RC_MOUSE_COORDS, HELP * RC_MOUSE_COORDS This has been changed to use rc_app_mouse LIB * RC_POINT, HELP * RC_POINT A point data structure and some convenient procedures for creating and locating points with the mouse. -- 4th April 1997 more work on rc_window_object Cleaned up and reorganised rc_new_window_object so that with "hidden" as argument, rc_new_window_object just creates the Pop-11 object but doesn't create the widget until it is first shown using rc_show_window There are still difficulties with twm, tvtwm, ctwm, not getting screen coordinates right, but rc_show_window, and rc_window_location now do an approximately accurate job. Added rc_window_sync() and rc_window_sync_time Other details (e.g. xt_new_window) may or may not be made public later. -- 30th March 1997 windows and ant_demo The representation of the class rc_window_object has been substantially modified and the methods for creating moving, showing and hiding window objects have been cleaned up and systematised. The class rc_live_window has been removed, and the slots and methods previously associated with this class have been moved to rc_window_object. Modified the rc_ant_demo program (ENTER rcdemo rc_ant_demo) to use coloured backgrounds and to have both incrementor and decrementor buttons for the number of ants. -- 25th March 1997 rc_draw_pointlist Renamed rc_draw_polyline as rc_draw_pointlist, in preparation for introduction of new classes. Moved stuff concerned with setting up Glinefunction to LIB rc_setup_linefunction Made rc_new_window_object invoke rc_setup_linefunction(); With help from Riccardo Poli, cleaned up and simplified LIB rc_black_white_inverted Made available currently drawn picture in the variable rc_current_picture_object (This required some reorganisation.) Compare rc_active_picture_object, which is set by the event handler Extended TEACH RC_LINEPIC in various ways. -- 22 Mar 1997 rc_mouse_limit generalised As suggested by Riccardo Poli allowed rc_mouse_limit to be a procedure. Illustrated in teach rc_linepic With help from Riccardo Poli re-wrote rc_black_white_inverted making it much simpler and faster, using XWhitePixel 17 Mar 1997 Fixed a bug in rc_buttons Extended documentation of rc_new_window_object, and allowed it to take an optional extra string argument to set the title of the window. -- 27 Jan 27 1997 extended rc_blocks demo Quite a lot of changes to rc_blocks demo (based on lib msblocks but now using the graphics facilities. Required a number of changes to rc_mousepic as it revealed bugs in the event handling. Made the event handler set these global variables: rc_active_widget -- the local value of rc_window rc_active_live_window -- instance of rc_live_window rc_active_window_object -- instance of rc_window_object rc_active_picture_object -- instance of rc_selectable etc. Jan 18th Added "ant" demo in $poplocal/local/rclib/demo/rc_ant_demo.p Jan 17th Modified event handling to allow mouse events to change the current window, destroy it, etc. Added extra buttons to the painting_demo -- 14 Jan 1997 and earlier Automated setting up of Glinefunction for Alphas, etc. Much improved version of LIB PAINTING_DEMO. Added LIB * RC_BLACK_WHITE_INVERTED for identifying colour mapping, and the procedures rc_xor_drawpic rc_equiv_drawpic rc_setup_linefunction Gdrawprocedure First draft LIB * RC_NEW_GRAPHIC_WIDGET For creating a graphic widget without displaying it. Jan 11th Reorganised rc_linepic, to cope properly with differences between Sun and DEC Alpha colour maps. Reorganised LIB PAINTING_DEMO accordingly Jan 9th Added LIB PAINTING_DEMO and first draft LIB RC_CONSTRAINED_MOVER Jan 8th Allowed rc_mouse_limit(pic) to be a vector of four numbers so that rectangular areas can be sensitive. Changed create_standard_button to set rectangular area sensitive. Jan 7th Fixed handling of graphics on DEC Alphastations and other terminals requiring GXequiv rather than GXxor (Thanks to help from Riccardo Poli) Jan 6th Added rc_pictures_selected method for window objects. Re-ordered part of this file. Fixed bug due to clipping. Made default print_instance for windows include title. Jan 5th Added window_objects, so that multiple windows can be used. Added button objects so that control panels can easily be created. (Will continue to change. Comments and suggestions please to A.Sloman@cs.bham.ac.uk ) Various other changes 4 Jan 1997 --- $usepop/pop/packages/rclib/help/rclib_news --- Copyright University of Birmingham 2006. All rights reserved. ------