UI_MENU_SELECTION *Selection;\r
FORM_BROWSER_STATEMENT *Question;\r
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r
- EFI_HII_VALUE *HiiValue;\r
EFI_BROWSER_ACTION_REQUEST ActionRequest;\r
\r
if (gMenuRefreshHead != NULL) {\r
ConfigAccess = Selection->FormSet->ConfigAccess;\r
if (((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) && (ConfigAccess != NULL)) {\r
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
-\r
- HiiValue = &Question->HiiValue;\r
- if (HiiValue->Type == EFI_IFR_TYPE_STRING) {\r
- //\r
- // Create String in HII database for Configuration Driver to retrieve\r
- //\r
- HiiValue->Value.string = NewString ((CHAR16 *) Question->BufferValue, Selection->FormSet->HiiHandle);\r
- }\r
-\r
Status = ConfigAccess->Callback (\r
ConfigAccess,\r
EFI_BROWSER_ACTION_CHANGING,\r
Question->QuestionId,\r
- HiiValue->Type,\r
- &HiiValue->Value,\r
+ Question->HiiValue.Type,\r
+ &Question->HiiValue.Value,\r
&ActionRequest\r
);\r
-\r
- if (HiiValue->Type == EFI_IFR_TYPE_STRING) {\r
- //\r
- // Clean the String in HII Database\r
- //\r
- DeleteString (HiiValue->Value.string, Selection->FormSet->HiiHandle);\r
- }\r
-\r
if (!EFI_ERROR (Status)) {\r
switch (ActionRequest) {\r
case EFI_BROWSER_ACTION_REQUEST_RESET:\r
Width -= SUBTITLE_INDENT;\r
}\r
\r
- return Width;\r
+ return (UINT16) (Width - LEFT_SKIPPED_COLUMNS);\r
}\r
\r
/**\r
Row = LocalScreen.TopRow + NONE_FRONT_PAGE_HEADER_HEIGHT + SCROLL_ARROW_HEIGHT;\r
}\r
\r
- Col = LocalScreen.LeftColumn;\r
+ Col = LocalScreen.LeftColumn + LEFT_SKIPPED_COLUMNS;\r
BottomRow = LocalScreen.BottomRow - STATUS_BAR_HEIGHT - FOOTER_HEIGHT - SCROLL_ARROW_HEIGHT - 1;\r
\r
Selection->TopRow = TopRow;\r
Width = GetWidth (Statement, MenuOption->Handle);\r
OriginalRow = Row;\r
\r
+ if (Statement->Operand == EFI_IFR_REF_OP && ((gClassOfVfr & FORMSET_CLASS_PLATFORM_SETUP) == FORMSET_CLASS_PLATFORM_SETUP)) {\r
+ //\r
+ // Print Arrow for Goto button.\r
+ //\r
+ PrintAt (\r
+ MenuOption->Col - LEFT_SKIPPED_COLUMNS,\r
+ Row,\r
+ L"%c",\r
+ GEOMETRICSHAPE_RIGHT_TRIANGLE\r
+ );\r
+ }\r
+\r
for (Index = 0; GetLineByWidth (MenuOption->Description, Width, &Index, &OutputString) != 0x0000;) {\r
if ((Temp == 0) && (Row <= BottomRow)) {\r
PrintStringAt (MenuOption->Col, Row, OutputString);\r
Temp = 0;\r
Row = OriginalRow;\r
\r
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);\r
Status = ProcessOptions (Selection, MenuOption, FALSE, &OptionString);\r
if (EFI_ERROR (Status)) {\r
//\r
Row = OriginalRow;\r
FreePool (StringPtr);\r
}\r
+ gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);\r
\r
//\r
// Need to handle the bottom of the display\r
//\r
Repaint = TRUE;\r
NewLine = TRUE;\r
+ } else {\r
+ Selection->Action = UI_ACTION_REFRESH_FORM;\r
}\r
if (OptionString != NULL) {\r
FreePool (OptionString);\r
\r
ASSERT(MenuOption != NULL);\r
Statement = MenuOption->ThisTag;\r
- if ((Statement->Operand == EFI_IFR_TEXT_OP) ||\r
- (Statement->Operand == EFI_IFR_DATE_OP) ||\r
- (Statement->Operand == EFI_IFR_TIME_OP) ||\r
- (Statement->Operand == EFI_IFR_NUMERIC_OP && Statement->Step != 0)) {\r
+ if (Statement->Operand == EFI_IFR_TEXT_OP) {\r
break;\r
}\r
\r
NewPos = NewPos->BackLink;\r
}\r
\r
+ Difference = MoveToNextStatement (TRUE, &NewPos);\r
PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos);\r
DistanceValue = PreviousMenuOption->Skip;\r
\r
// checking can be done.\r
//\r
DistanceValue += AdjustDateAndTimePosition (TRUE, &NewPos);\r
-\r
- //\r
- // Check the previous menu entry to see if it was a zero-length advance. If it was,\r
- // don't worry about a redraw.\r
- //\r
- ASSERT(MenuOption != NULL);\r
- if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) {\r
- Repaint = TRUE;\r
- TopOfScreen = NewPos;\r
- }\r
-\r
- Difference = MoveToNextStatement (TRUE, &NewPos);\r
- PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos);\r
- DistanceValue += PreviousMenuOption->Skip;\r
-\r
- if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) {\r
- if (Difference > 0) {\r
- //\r
- // Previous focus MenuOption is above the TopOfScreen, so we need to scroll\r
- //\r
- TopOfScreen = NewPos;\r
- Repaint = TRUE;\r
- SkipValue = 0;\r
- OldSkipValue = 0;\r
- }\r
- }\r
+ \r
+ ASSERT (MenuOption != NULL);\r
if (Difference < 0) {\r
//\r
// We want to goto previous MenuOption, but finally we go down.\r
TopOfScreen = gMenuOption.ForwardLink;\r
Repaint = TRUE;\r
}\r
+ } else if ((INTN) MenuOption->Row - (INTN) DistanceValue - Difference < (INTN) TopRow) {\r
+ //\r
+ // Previous focus MenuOption is above the TopOfScreen, so we need to scroll\r
+ //\r
+ TopOfScreen = NewPos;\r
+ Repaint = TRUE;\r
+ SkipValue = 0;\r
+ OldSkipValue = 0;\r
}\r
\r
//\r
MenuOption = MENU_OPTION_FROM_LINK (NewPos);\r
NewLine = TRUE;\r
NewPos = NewPos->ForwardLink;\r
- NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);\r
\r
- DistanceValue += NextMenuOption->Skip;\r
DistanceValue += MoveToNextStatement (FALSE, &NewPos);\r
+ NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);\r
+\r
//\r
// An option might be multi-line, so we need to reflect that data in the overall skip value\r
//\r
UpdateOptionSkipLines (Selection, NextMenuOption, &OptionString, (UINTN) SkipValue);\r
+ DistanceValue += NextMenuOption->Skip;\r
\r
Temp = MenuOption->Row + MenuOption->Skip + DistanceValue - 1;\r
if ((MenuOption->Row + MenuOption->Skip == BottomRow + 1) &&\r
//\r
// If we have a remainder, skip that many more op-codes until we drain the remainder\r
//\r
- for (;\r
- Difference >= (INTN) SavedMenuOption->Skip;\r
- Difference = Difference - (INTN) SavedMenuOption->Skip\r
- ) {\r
+ while (Difference >= (INTN) SavedMenuOption->Skip) {\r
//\r
// Since the Difference is greater than or equal to this op-code's skip value, skip it\r
//\r
+ Difference = Difference - (INTN) SavedMenuOption->Skip;\r
TopOfScreen = TopOfScreen->ForwardLink;\r
SavedMenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);\r
- if (Difference < (INTN) SavedMenuOption->Skip) {\r
- Difference = SavedMenuOption->Skip - Difference - 1;\r
- break;\r
- } else {\r
- if (Difference == (INTN) SavedMenuOption->Skip) {\r
- TopOfScreen = TopOfScreen->ForwardLink;\r
- SavedMenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);\r
- Difference = SavedMenuOption->Skip - Difference;\r
- break;\r
- }\r
- }\r
}\r
//\r
// Since we will act on this op-code in the next routine, and increment the\r
} else {\r
SkipValue++;\r
}\r
+ } else if (SavedMenuOption->Skip == 1) {\r
+ SkipValue = 0;\r
} else {\r
SkipValue = 0;\r
TopOfScreen = TopOfScreen->ForwardLink;\r