Lines Matching refs:BootMenuData
158 IN OUT BOOT_MENU_POPUP_DATA *BootMenuData in InitializeBootMenuScreen() argument
169 if (BootMenuData == NULL) { in InitializeBootMenuScreen()
177 StrWidth = GetLineWidth (BootMenuData->TitleToken[Index]); in InitializeBootMenuScreen()
181 for (Index = 0; Index < BootMenuData->ItemCount; Index++) { in InitializeBootMenuScreen()
182 StrWidth = GetLineWidth (BootMenuData->PtrTokens[Index]); in InitializeBootMenuScreen()
187 StrWidth = GetLineWidth (BootMenuData->HelpToken[Index]); in InitializeBootMenuScreen()
202 BootMenuData->MenuScreen.Width = MaxStrWidth + 8; in InitializeBootMenuScreen()
203 if (BootMenuData->ItemCount + UnSelectableItmes > MaxPrintRows) { in InitializeBootMenuScreen()
204 BootMenuData->MenuScreen.Height = MaxPrintRows; in InitializeBootMenuScreen()
205 BootMenuData->ScrollBarControl.HasScrollBar = TRUE; in InitializeBootMenuScreen()
206 BootMenuData->ScrollBarControl.ItemCountPerScreen = MaxPrintRows - UnSelectableItmes; in InitializeBootMenuScreen()
207 BootMenuData->ScrollBarControl.FirstItem = 0; in InitializeBootMenuScreen()
208 BootMenuData->ScrollBarControl.LastItem = MaxPrintRows - UnSelectableItmes - 1; in InitializeBootMenuScreen()
210 BootMenuData->MenuScreen.Height = BootMenuData->ItemCount + UnSelectableItmes; in InitializeBootMenuScreen()
211 BootMenuData->ScrollBarControl.HasScrollBar = FALSE; in InitializeBootMenuScreen()
212 BootMenuData->ScrollBarControl.ItemCountPerScreen = BootMenuData->ItemCount; in InitializeBootMenuScreen()
213 BootMenuData->ScrollBarControl.FirstItem = 0; in InitializeBootMenuScreen()
214 BootMenuData->ScrollBarControl.LastItem = BootMenuData->ItemCount - 1; in InitializeBootMenuScreen()
216 BootMenuData->MenuScreen.StartCol = (Column - BootMenuData->MenuScreen.Width) / 2; in InitializeBootMenuScreen()
217 BootMenuData->MenuScreen.StartRow = (Row - BootMenuData->MenuScreen.Height) / 2; in InitializeBootMenuScreen()
303 OUT BOOT_MENU_POPUP_DATA *BootMenuData in InitializeBootMenuData() argument
309 if (BootOption == NULL || BootMenuData == NULL) { in InitializeBootMenuData()
313 BootMenuData->TitleToken[0] = STRING_TOKEN (STR_BOOT_POPUP_MENU_TITLE_STRING); in InitializeBootMenuData()
314 BootMenuData->PtrTokens = AllocateZeroPool (BootOptionCount * sizeof (EFI_STRING_ID)); in InitializeBootMenuData()
315 ASSERT (BootMenuData->PtrTokens != NULL); in InitializeBootMenuData()
326 BootMenuData->PtrTokens[StrIndex++] = HiiSetString ( in InitializeBootMenuData()
334 BootMenuData->ItemCount = StrIndex; in InitializeBootMenuData()
335 BootMenuData->HelpToken[0] = STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP1_STRING); in InitializeBootMenuData()
336 BootMenuData->HelpToken[1] = STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP2_STRING); in InitializeBootMenuData()
337 BootMenuData->HelpToken[2] = STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP3_STRING); in InitializeBootMenuData()
338 InitializeBootMenuScreen (BootMenuData); in InitializeBootMenuData()
339 BootMenuData->SelectItem = 0; in InitializeBootMenuData()
357 IN OUT BOOT_MENU_POPUP_DATA *BootMenuData in BootMenuSelectItem() argument
374 if (BootMenuData == NULL || WantSelectItem >= BootMenuData->ItemCount) { in BootMenuSelectItem()
379 StartCol = BootMenuData->MenuScreen.StartCol; in BootMenuSelectItem()
380 StartRow = BootMenuData->MenuScreen.StartRow; in BootMenuSelectItem()
384 if (BootMenuData->ScrollBarControl.HasScrollBar && in BootMenuSelectItem()
385 (WantSelectItem < BootMenuData->ScrollBarControl.FirstItem || in BootMenuSelectItem()
386 WantSelectItem > BootMenuData->ScrollBarControl.LastItem || in BootMenuSelectItem()
387 WantSelectItem == BootMenuData->SelectItem)) { in BootMenuSelectItem()
388 ItemCountPerScreen = BootMenuData->ScrollBarControl.ItemCountPerScreen; in BootMenuSelectItem()
392 if (WantSelectItem < BootMenuData->ScrollBarControl.FirstItem) { in BootMenuSelectItem()
393 BootMenuData->ScrollBarControl.FirstItem = WantSelectItem; in BootMenuSelectItem()
394 BootMenuData->ScrollBarControl.LastItem = WantSelectItem + ItemCountPerScreen - 1; in BootMenuSelectItem()
395 } else if (WantSelectItem > BootMenuData->ScrollBarControl.LastItem) { in BootMenuSelectItem()
396 BootMenuData->ScrollBarControl.FirstItem = WantSelectItem - ItemCountPerScreen + 1; in BootMenuSelectItem()
397 BootMenuData->ScrollBarControl.LastItem = WantSelectItem; in BootMenuSelectItem()
400 FirstItem = BootMenuData->ScrollBarControl.FirstItem; in BootMenuSelectItem()
401 LastItem = BootMenuData->ScrollBarControl.LastItem; in BootMenuSelectItem()
404 TopShadeNum = (FirstItem * ItemCountPerScreen) / BootMenuData->ItemCount; in BootMenuSelectItem()
405 if ((FirstItem * ItemCountPerScreen) % BootMenuData->ItemCount != 0) { in BootMenuSelectItem()
408 PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2; in BootMenuSelectItem()
415 if (LastItem != BootMenuData->ItemCount - 1) { in BootMenuSelectItem()
416 …LowShadeNum = ((BootMenuData->ItemCount - 1 - LastItem) * ItemCountPerScreen) / BootMenuData->Item… in BootMenuSelectItem()
417 …if (((BootMenuData->ItemCount - 1 - LastItem) * ItemCountPerScreen) % BootMenuData->ItemCount != 0… in BootMenuSelectItem()
420 PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2; in BootMenuSelectItem()
426 PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2; in BootMenuSelectItem()
438 String = AllocateZeroPool ((BootMenuData->MenuScreen.Width - 2) * sizeof (CHAR16)); in BootMenuSelectItem()
440 for (Index = 0; Index < BootMenuData->MenuScreen.Width - 3; Index++) { in BootMenuSelectItem()
451 String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[Index + FirstItem], NULL); in BootMenuSelectItem()
461 FirstItem = BootMenuData->ScrollBarControl.FirstItem; in BootMenuSelectItem()
463 String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem], NULL); in BootMenuSelectItem()
473 if (WantSelectItem != BootMenuData->SelectItem && !RePaintItems) { in BootMenuSelectItem()
475 …String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[BootMenuData->SelectItem], NULL); in BootMenuSelectItem()
477 PrintRow = StartRow + 3 + BootMenuData->SelectItem - FirstItem; in BootMenuSelectItem()
483 BootMenuData->SelectItem = WantSelectItem; in BootMenuSelectItem()
497 IN BOOT_MENU_POPUP_DATA *BootMenuData in DrawBootPopupMenu() argument
515 Width = BootMenuData->MenuScreen.Width; in DrawBootPopupMenu()
516 StartCol = BootMenuData->MenuScreen.StartCol; in DrawBootPopupMenu()
517 StartRow = BootMenuData->MenuScreen.StartRow; in DrawBootPopupMenu()
518 ItemCountPerScreen = BootMenuData->ScrollBarControl.ItemCountPerScreen; in DrawBootPopupMenu()
595 String = HiiGetString (gStringPackHandle, BootMenuData->TitleToken[Index], NULL); in DrawBootPopupMenu()
596 LineWidth = GetLineWidth (BootMenuData->TitleToken[Index]); in DrawBootPopupMenu()
608 String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[Index], NULL); in DrawBootPopupMenu()
618 String = HiiGetString (gStringPackHandle, BootMenuData->HelpToken[Index], NULL); in DrawBootPopupMenu()
619 LineWidth = GetLineWidth (BootMenuData->HelpToken[Index]); in DrawBootPopupMenu()
628 if (BootMenuData->ScrollBarControl.HasScrollBar) { in DrawBootPopupMenu()
642 BootMenuSelectItem (BootMenuData->SelectItem, BootMenuData); in DrawBootPopupMenu()
911 BOOT_MENU_POPUP_DATA BootMenuData; in BootManagerMenuEntry() local
1010 Status = InitializeBootMenuData (BootOption, BootOptionCount, &BootMenuData); in BootManagerMenuEntry()
1014 DrawBootPopupMenu (&BootMenuData); in BootManagerMenuEntry()
1030 …SelectItem = BootMenuData.SelectItem == 0 ? BootMenuData.ItemCount - 1 : BootMenuData.SelectItem -… in BootManagerMenuEntry()
1031 BootMenuSelectItem (SelectItem, &BootMenuData); in BootManagerMenuEntry()
1035 …SelectItem = BootMenuData.SelectItem == BootMenuData.ItemCount - 1 ? 0 : BootMenuData.SelectItem +… in BootManagerMenuEntry()
1036 BootMenuSelectItem (SelectItem, &BootMenuData); in BootManagerMenuEntry()
1059 BootFromSelectOption (BootOption, BootOptionCount, BootMenuData.SelectItem); in BootManagerMenuEntry()
1064 DrawBootPopupMenu (&BootMenuData); in BootManagerMenuEntry()
1073 FreePool (BootMenuData.PtrTokens); in BootManagerMenuEntry()