ReactOS  0.4.13-dev-99-g7e18b6d
minitui.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID MiniTuiDrawBackdrop (VOID)
 
VOID MiniTuiDrawStatusText (PCSTR StatusText)
 
VOID MiniTuiDrawProgressBarCenter (ULONG Position, ULONG Range, PCHAR ProgressText)
 
VOID MiniTuiDrawProgressBar (ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
 
VOID MiniTuiDrawMenu (PUI_MENU_INFO MenuInfo)
 

Variables

const UIVTBL MiniTuiVtbl
 

Function Documentation

◆ MiniTuiDrawBackdrop()

VOID MiniTuiDrawBackdrop ( VOID  )

Definition at line 12 of file minitui.c.

13 {
14  //
15  // Fill in a black background
16  //
17  TuiFillArea(0, 0, UiScreenWidth - 1, UiScreenHeight - 1, 0, 0);
18 
19  //
20  // Update the screen buffer
21  //
23 }
ULONG UiScreenHeight
Definition: ui.c:29
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: tui.c:151
ULONG UiScreenWidth
Definition: ui.c:28
VOID VideoCopyOffScreenBufferToVRAM(VOID)
Definition: video.c:41

◆ MiniTuiDrawMenu()

VOID MiniTuiDrawMenu ( PUI_MENU_INFO  MenuInfo)

Definition at line 76 of file minitui.c.

77 {
78  ULONG i;
79 
80  //
81  // Draw the backdrop
82  //
84 
85  //
86  // No GUI status bar text, just minimal text. Show the menu header.
87  //
88  UiVtbl.DrawText(0,
89  MenuInfo->Top - 2,
90  MenuInfo->MenuHeader,
92 
93  //
94  // Now tell the user how to choose
95  //
96  UiVtbl.DrawText(0,
97  MenuInfo->Bottom + 1,
98  "Use \x18 and \x19 to move the highlight to your choice.",
100  UiVtbl.DrawText(0,
101  MenuInfo->Bottom + 2,
102  "Press ENTER to choose.",
104 
105  //
106  // And show the menu footer
107  //
108  UiVtbl.DrawText(0,
109  UiScreenHeight - 4,
110  MenuInfo->MenuFooter,
112 
113  //
114  // Draw the menu box
115  //
117 
118  //
119  // Draw each line of the menu
120  //
121  for (i = 0; i < MenuInfo->MenuItemCount; i++)
122  {
124  }
125 
126  //
127  // Display the boot options if needed
128  //
129  if (MenuInfo->ShowBootOptions)
130  {
132  }
133 
135 }
VOID(* DrawText)(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.h:126
VOID NTAPI TuiDrawMenuBox(PUI_MENU_INFO MenuInfo)
Definition: tuimenu.c:273
ULONG UiScreenHeight
Definition: ui.c:29
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
UIVTBL UiVtbl
Definition: ui.c:58
#define ATTR(cFore, cBack)
Definition: ui.h:152
UCHAR UiMenuBgColor
Definition: ui.c:41
VOID UiDrawBackdrop(VOID)
Definition: ui.c:241
menu info structure
Definition: window.h:275
VOID DisplayBootTimeOptions(VOID)
Definition: options.c:173
unsigned int ULONG
Definition: retypes.h:1
UCHAR UiMenuFgColor
Definition: ui.c:40
VOID VideoCopyOffScreenBufferToVRAM(VOID)
Definition: video.c:41
VOID NTAPI TuiDrawMenuItem(PUI_MENU_INFO MenuInfo, ULONG MenuItemNumber)
Definition: tuimenu.c:399

◆ MiniTuiDrawProgressBar()

VOID MiniTuiDrawProgressBar ( ULONG  Left,
ULONG  Top,
ULONG  Right,
ULONG  Bottom,
ULONG  Position,
ULONG  Range,
PCHAR  ProgressText 
)

Definition at line 47 of file minitui.c.

48 {
49  ULONG i;
50  ULONG ProgressBarWidth = (Right - Left) - 4;
51 
52  // First make sure the progress bar text fits
53  UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4);
54 
55  if (Position > Range)
56  {
57  Position = Range;
58  }
59 
60  //
61  // Draw the "Loading..." text
62  //
63  TuiDrawCenteredText(Left + 2, Top + 1, Right - 2, Top + 1, ProgressText, ATTR(7, 0));
64 
65  // Draw the percent complete
66  for (i=0; i<(Position*ProgressBarWidth)/Range; i++)
67  {
68  TuiDrawText(Left+2+i, Top+2, "\xDB", ATTR(UiTextColor, UiMenuBgColor));
69  }
70 
73 }
UCHAR UiTextColor
Definition: ui.c:42
VOID TuiUpdateDateTime(VOID)
Definition: tui.c:426
static COORD Position
Definition: mouse.c:34
struct tagRange Range
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ATTR(cFore, cBack)
Definition: ui.h:152
UCHAR UiMenuBgColor
Definition: ui.c:41
VOID TuiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: tui.c:318
Definition: range.c:43
VOID UiTruncateStringEllipsis(PCHAR StringText, ULONG MaxChars)
Definition: ui.c:451
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
Definition: tui.c:350
unsigned int ULONG
Definition: retypes.h:1
VOID VideoCopyOffScreenBufferToVRAM(VOID)
Definition: video.c:41
static LPHIST_ENTRY Top
Definition: history.c:53

Referenced by MiniTuiDrawProgressBarCenter().

◆ MiniTuiDrawProgressBarCenter()

VOID MiniTuiDrawProgressBarCenter ( ULONG  Position,
ULONG  Range,
PCHAR  ProgressText 
)

Definition at line 32 of file minitui.c.

33 {
34  ULONG Left, Top, Right, Bottom;
35  ULONG Width = 50; // Allow for 50 "bars"
36  ULONG Height = 2;
37 
38  Width = 80;
39  Left = 0;
40  Right = Left + Width;
41  Top = UiScreenHeight - Height - 4;
42  Bottom = Top + Height + 1;
43 
44  MiniTuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
45 }
static COORD Position
Definition: mouse.c:34
ULONG UiScreenHeight
Definition: ui.c:29
Definition: range.c:43
static LPHIST_ENTRY Bottom
Definition: history.c:54
VOID MiniTuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
Definition: minitui.c:47
unsigned int ULONG
Definition: retypes.h:1
static LPHIST_ENTRY Top
Definition: history.c:53

◆ MiniTuiDrawStatusText()

VOID MiniTuiDrawStatusText ( PCSTR  StatusText)

Definition at line 25 of file minitui.c.

26 {
27  //
28  // Minimal UI doesn't have a status bar
29  //
30 }

Variable Documentation

◆ MiniTuiVtbl

const UIVTBL MiniTuiVtbl

Definition at line 137 of file minitui.c.

Referenced by UiInitialize().