! LSE$MOUSE.TPU ! !************************************************************************* ! * ! © Copyright 2005 Hewlett-Packard Development Company, L.P. * ! * ! Confidential computer software. Valid license from HP required for * ! possession, use or copying. Consistent with FAR 12.211 and 12.212, * ! Commercial Computer Software, Computer Software Documentation, and * ! Technical Data for Commercial Items are licensed to the U.S. * ! Government under vendor's standard commercial license. * ! * !************************************************************************* ! !++ ! FACILITY: ! Text Processing Utility (VAXTPU) ! ! ABSTRACT: ! This is the source program for the EVE mouse operations. ! ! ENVIRONMENT: ! VAX/VMS ! !Authors: Jim Burrows, Glenn J. Joyce, J.P. Wild ! ! CREATION DATE: 11-Feb-1988 ! ! MODIFIED BY: ! X2.3 GJJ 13-Aug-88 Added LSE popups to the EVE$$MB2_DISPATCH routine. ! X2.3-1 GJJ 23-Aug-88 Made the buffer-specific popups work off the ! current mouse position rather than the current ! cursor position. ! X2.3-2 JPW 7-Sep-88 Add EVE$$M1DOWN and EVE$$M1CLICKN for the REVIEW ! and QUERY buffer highlighting. ! X2.3-3 JPW 8-Sep-88 Remove call to lse$$query_pre_filter in ! EVE$$M1DOWN because no longer used. ! X2.3-4 GJJ 15-Sep-88 Fixed typos in popups which were introduced when ! this module was converted to DECwindows V1 ! TPU in edit X2.3-1. ! X2.3-5 JPW 21-Sep-88 Add the routines EVE$$M1UP and EVE$$M1DRAG that have ! been modified to disable drag in the REVIEW and ! QUERY buffers. ! X2.3-6 JPW 27-Sep-88 Disable cursor positioning in EVE$$M1UP and ! EVE$$M1DRAG when in the REVIEW and QUERY buffers. ! X2.3-7 CCC 03-Oct-88 Add eve$mouse_module_init to change direction ! indicator ! X2.3-8 CCC 26-Oct-88 Change eve$k_widget_hierarchy to eve$x_... ! X2.3-8 DAS 31-Oct-88 Add popup support for the user buffer popup. ! X2.3-9 DAS 04-Nov-88 Positioning of Popups and EVE_SELECT_POPUP ! Removed empty module initialization procedure ! Moved override of eve module init to top ! X2.3-10 GJJ 7-Dec-88 Merged in the 23-Nov Eve changes to ! EVE$MOUSE_MODULE_INIT and EVE$$M1CLICKN. ! X2.3-11 GJJ 8-Dec-88 Merged in 8-Dec Eve changes to EVE$$M1CLICKN. ! X2.3-12 GJJ 8-Dec-88 Rewrite our hooks in EVE$$M1CLICKN to correct ! a positioning problem in M1CLICK2/BUFFER LIST ! and make the code easier to read. ! X2.3-13 DAS 15-Dec-88 Removed overriding of EVE module init by moving ! LSE specifics to our own module init. ! X2.3-14 DAS 28-Dec-88 When the user positions to a user buffer with MB1 ! and the cursor is BOUND, then don't use free. ! X2.3-15 DAS 11-Jan-89 Hardcoded "BUFFER LIST" buffer name has been ! changed to the appropriate eve variable. ! X2.3-16 DAS 09-Feb-89 Commenting out EVE$CLEAR_MESSAGE in M1Down routine ! X2.3-17 DAS 15-Feb-89 Adding support for mice to allow scroll margins... ! X2.3-18 DAS 20-Feb-89 Double clicks in REVIEW and QUERY were broken ! X2.3-19 DAS 23-Feb-89 Ignore multclicks in Command and message windows ! X2.3-20 DAS 23-Feb-89 Ignore drags in command/message windows and position ! to this window on mouse button down. This means ! that we also ignore mouse button ups on these. ! X2.3-21 DAS 24-Feb-89 Fix positioning to tabs in bound cursor mode making ! the tab selected. ! X2.3-22 DAS 08-Mar-89 MB2 does NEXT WINDOW commands until it gets to the ! window over which MB2 was pressed. ! X2.3-23 WC3 14-Mar-89 Remove restriction of drag operations in QUERY ! and REVIEW buffers. Remove old highlight support ! from key driven days and add new command driven ! highlighting calls. ! X2.3-24 GJJ 15-Mar-89 Fix typo in call to LSE$$HIGHLIGHT. ! X2.3-25 DAS 16-Mar-89 Reorder all mice routine for better understanding ! X2.3-26 DAS 30-Mar-89 Changed selection routine to be a jacket around ! a handling procedure in order to respond to ourself. ! Supercede EVE$STUFF_GLOBAL_SELECTION because EVE ! tests input focus instead of global select owner. ! X2.3-27 DAS 04-Apr-89 Superceded EVE$$MOUSE_KEY procedure only to change ! the mouse key that calls stuff_selection from ! M3DOWN to M3CLICK. ! X2.3-28 WC3 04-Apr-89 Modify eve$$m1clickn to remove trailing spaces ! from a word on double click. ! X2.3-29 WC3 12-Apr-89 Add support for null selection and responding to: ! _DEC_WORD_CHARACTER_OFFSET ! _DEC_CHARACTER_OFFSET ! X2.3-30 GJJ 1-May-89 Add set/clear of EVE$$K_COMMAND_LINE_FLAG around ! M1 double click in the query/review buffers ! in order to get possible prompts to come out in ! dialog boxes. ! X3.0-01 PBP 14-Aug-89 Rename procedures from EVE$$ to LSE$$ and fix ! and references to procedure names ! X3.0-02 WC3 22-Sep-89 Cut the dependency for identifying a query buffer ! by it's name. ! X3.0-03 DAS 20-Oct-89 Supercede EVE procedure eve$stuff_global_selection ! to encapsulate overview lines first. ! X3.1-01 DAS 27-Dec-89 Moved superceded EVE procedures to the module ! LSE$EVE_MOUSE.TPU. ! X3.1-02 WC3 23-May-90 Changed the name of LSE$$HIGHLIGHT to ! LSE$POST_COMMAND_PROC. ! Added calls to LSE$$HIGHLIGHT_REVIEW and ! LSE$$HIGHLIGHT_QUERY during MB2 processing. ! X3.1-3 WC3 27-Jul-90 Changed test of eve$x_bound_cursor to ! GET_INFO( SYSTEM, 'lse$cursor_bound' ) ! X3.1-4 WC3 04-Aug-90 Changee eve$x_scroll_top/bottom to get_info ! X3.2-5 DEC 13-Aug-90 Change call to lse$$set_forward(reverse) to ! lse_forward(reverse) ! X3.2-6 WC3 01-Oct-90 Change: ! parameters to many GET_INFOS ! lse_forward to lse_set_buffer_forward ! lse_reverse to lse_set_buffer_reverse ! X3.2-7 WC3 10-Oct-90 Change the call to lse_set_buffer_forward and ! lse_set_buffer_reverse ! X3.2-8 GJJ 28-Feb-91 Converted uses of resouce and callback reason ! names to match the TPU 3.0 FT3 format; updated ! the copyright notice. ! X4.0-1 WC3 09-Apr-91 Added show mark goto source and show list ! expand support to double click ! X4.0-2 WC3 29-Apr-91 Change se$is_show_list to return a boolean ! X4.0-3 WC3 15-May-91 Portable language consistency ! X4.0-4 SHE 24-May-91 Use cli GOTO SOURCE command for double-click in ! query window. ! X4.0-5 WC3 30-Jul-91 Remove unnecessary mouse button procedures ! X4.0-6 SHE 30-Jul-91 Removed lse$$menu_position ! X4.0-7 WC3 12-Dec-91 Removed the MODULE/ENDMODULE construct !-- procedure lse$mouse_module_ident return "X4.0-7"; endprocedure; ! ! Local procedure that returns true if the window is a query window. ! procedure lse$$is_query_window( the_window ) local the_buffer; ON_ERROR [OTHERWISE]: lse$$unexpected_error( ERROR, ERROR_TEXT, ERROR_LINE, "lse$$is_query_window"); ENDON_ERROR; ! ! Get the buffer associated with the window ! the_buffer := get_info (the_window, "buffer"); ! ! If we have a buffer, then check the buffer's name ! if the_buffer <> 0 then RETURN lse$$is_query( the_buffer ) endif; ! ! Not a query window ! return (FALSE); endprocedure; ! ! Local procedure that returns true if the window is a show window. ! procedure lse$$is_show_list_window( the_window ) local the_buffer; LOCAL buf_name; ON_ERROR [OTHERWISE]: lse$$unexpected_error( ERROR, ERROR_TEXT, ERROR_LINE, "lse$$is_show_list_window"); ENDON_ERROR; ! ! Get the buffer associated with the window ! the_buffer := get_info (the_window, "buffer"); ! ! If we have a buffer, then check the buffer's name ! if the_buffer <> 0 then return lse$is_show_list( the_buffer ) endif; ! ! Not a query window ! return (FALSE); endprocedure; ! ! Local procedure that returns true if the window is a review window. ! procedure lse$$is_review_window (the_window) ON_ERROR [OTHERWISE]: lse$$unexpected_error( ERROR, ERROR_TEXT, ERROR_LINE, "lse$$is_review_window "); ENDON_ERROR; ! ! Get the buffer associated with the window ! if get_info(get_info(the_window, "buffer"),"name") = "$REVIEW" then return (true); else return (false); endif; endprocedure; procedure lse$$init_global_selection_array( number_of_entries ) ! ! FUNCTION ! ! lse$$init_global_selection_array initializes lse$$global_selection_array ! the array used to return information from LSE$$BIF_RESPOND_GLOBAL_SELECT ! when the target requires an array. ! ! INPUTS ! ! number_of_entries - number of elements in the array ! ! OUTPUTS ! ! lse$$global_selection_array - empty array created ! lse$$global_selection_array_index - 0 ! ON_ERROR [OTHERWISE]: lse$$unexpected_error( ERROR, ERROR_TEXT, ERROR_LINE, "lse$$init_global_selection_array"); ENDON_ERROR; delete( lse$$global_selection_array ); lse$$global_selection_array_index := 0; lse$$global_selection_array := create_array( number_of_entries, lse$$global_selection_array_index ); endprocedure; procedure lse$$load_global_selection_array( next_entry ) ! ! FUNCTION ! ! lse$$load_global_selection_array takes its parameter and puts it in the ! next element of the array lse$$global_selection_array. ! ! It is used by LSE$$BIF_RESPOND_GLOBAL_SELECT to return global selection ! information via an array. ! ! INPUTS ! ! next_entry - The value to put in the array ! ! OUTPUTS ! ! lse$$global_selection_array - an element in updated ! lse$$global_selection_array_index; - the index in incremented ! ON_ERROR [OTHERWISE]: lse$$unexpected_error( ERROR, ERROR_TEXT, ERROR_LINE, "lse$$load_global_selection_array"); ENDON_ERROR; lse$$global_selection_array{ lse$$global_selection_array_index } := next_entry; lse$$global_selection_array_index := lse$$global_selection_array_index + 1; endprocedure;