4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Implements statusbar interface functions.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync which accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Initialization function for Status Bar.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The operation was successful.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @sa StatusBarSetStatusString
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // initialize the statusbar
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // status string set to ""
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Cleanup function for the status bar.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // free the status string and backvar's status string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef union {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Cause the status bar to refresh it's printing on the screen.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] EditorFirst TRUE to indicate the first launch of the editor.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FALSE otherwise.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] LastRow LastPrintable row.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] LastCol Last printable column.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] FileRow Row in the file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] FileCol Column in the file.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] InsertMode TRUE to indicate InsertMode. FALSE otherwise.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The operation was successful.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if (!StatusStringChanged && StatusBarNeedRefresh) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // when it's called first time after editor launch, so refresh is mandatory
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if (!StatusBarNeedRefresh && !StatusStringChanged) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // back up the screen attributes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // clear status bar
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // print row, column fields
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if (FileRow != (UINTN)(-1) && FileCol != (UINTN)(-1)) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync L" %d,%d %s",
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // print insert mode field
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ShellPrintEx ((INT32)(LastCol) - 21, (INT32)(LastRow) - 1, L"|%s| Help: Ctrl-E", L"INS");
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ShellPrintEx ((INT32)(LastCol) - 21, (INT32)(LastRow) - 1, L"|%s| Help: Ctrl-E", L"OVR");
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // restore the old screen attributes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync gST->ConOut->SetAttribute (gST->ConOut, Orig.Data);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // restore position in edit area
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Set the status string text part.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Str The string to use.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The operation was successful.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // free the old status string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Function to retrieve the current status string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The string that is used.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Function to set the need refresh boolean to TRUE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Function to get the need refresh boolean to TRUE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE The status bar needs to be refreshed.