! ! ! ***** SET STATUS LINE ***** ! ! Set status line of a window to include buffer name and mode indications. ! Used primarily to indicate insert/overstrike and forward/reverse toggling. ! ! Parameters: ! ! this_window Window whose status line is being set - input ! ! FRED Version: Includes setting of CHANGE_CASE function and ! location of cursor. ! PROCEDURE eve$set_status_line (this_window) LOCAL this_buffer, ! Current buffer alt_delim, ! State of word delimiters cut_paste_mode, ! State of cut/paste mode mode_string, ! String version of current mode direction_string, ! String version of current direction buffer_name; ! String containing name of current buffer this_buffer := GET_INFO (this_window, "buffer"); ! Don't add a status line to windows without a status line if (this_buffer = 0) or (GET_INFO (this_window, "status_line") = 0) then RETURN; endif; if GET_INFO (this_buffer, "mode") = insert then mode_string := "Insert"; else mode_string := "Over "; endif; if GET_INFO (this_buffer, "direction") = REVERSE then direction_string := "Rev"; else direction_string := "For"; endif; if decus$x_rectangular_set = 1 then cut_paste_mode := "R_CutPas"; else cut_paste_mode := " "; endif; if eve$x_starting_up then ! Set it to something... fred$x_word := " "; endif; if INDEX (fred$x_word,"/") = 0 then ! Toggle word delimiters alt_delim := " "; ! Standard delimiters else alt_delim := "Alt_Delim"; ! Alternate delimiters endif; buffer_name := GET_INFO (this_buffer, "name"); if LENGTH (buffer_name) > eve$x_max_buffer_name_length then buffer_name := SUBSTR (buffer_name, 1, eve$x_max_buffer_name_length); else buffer_name := buffer_name + SUBSTR (eve$x_spaces, 1, eve$x_max_buffer_name_length - LENGTH (buffer_name)); endif; if (GET_INFO (this_buffer, "no_write")) and (GET_INFO (this_buffer, "system") = 0) then SET (status_line, this_window, bold, "X"); SET (status_line, this_window, underline, "X"); else SET (status_line, this_window, none, "X"); endif; SET (status_line, this_window, reverse," " + buffer_name + " " + fred$x_wp_mode + " " + alt_delim + " " + cut_paste_mode + " " + fred$x_current_case + " " + mode_string + " " + direction_string); ENDPROCEDURE; ! ! Update the status lines of ALL windows. ! ! PROCEDURE eve$update_status_lines LOCAL loop_window; ! Window currently being updated loop_window := GET_INFO (WINDOW, eve$kt_first); loop exitif loop_window = 0; eve$set_status_line (loop_window); loop_window := GET_INFO (WINDOW, "next"); endloop; ENDPROCEDURE;