ReactOS 0.4.15-dev-7842-g558ab78
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 MiniTuiSetProgressBarText (_In_ PCSTR ProgressText)
 
VOID MiniTuiTickProgressBar (_In_ ULONG SubPercentTimes100)
 
VOID MiniTuiDrawProgressBarCenter (_In_ PCSTR ProgressText)
 
VOID MiniTuiDrawProgressBar (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
 
VOID MiniTuiDrawMenu (_In_ PUI_MENU_INFO MenuInfo)
 

Variables

const UIVTBL MiniTuiVtbl
 

Function Documentation

◆ MiniTuiDrawBackdrop()

VOID MiniTuiDrawBackdrop ( VOID  )

Definition at line 56 of file minitui.c.

57{
58 /* Fill in a black background */
62
63 /* Update the screen buffer */
65}
VOID VideoCopyOffScreenBufferToVRAM(VOID)
Definition: video.c:38
ULONG UiScreenWidth
Definition: ui.c:54
#define ATTR(cFore, cBack)
Definition: ui.h:317
UCHAR UiBackdropFgColor
Definition: ui.c:27
UCHAR UiBackdropFillStyle
Definition: ui.c:29
UCHAR UiBackdropBgColor
Definition: ui.c:28
ULONG UiScreenHeight
Definition: ui.c:55
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr)
Definition: tui.c:329

◆ MiniTuiDrawMenu()

VOID MiniTuiDrawMenu ( _In_ PUI_MENU_INFO  MenuInfo)

Definition at line 183 of file minitui.c.

185{
186 ULONG i;
187
188 /* Draw the backdrop */
190
191 /* No GUI status bar text, just minimal text. Show the menu header. */
192 if (MenuInfo->MenuHeader)
193 {
195 MenuInfo->Top - 2,
196 MenuInfo->MenuHeader,
198 }
199
200 /* Draw the menu box */
202
203 /* Draw each line of the menu */
204 for (i = 0; i < MenuInfo->MenuItemCount; ++i)
205 {
207 }
208
209 /* Now tell the user how to choose */
211 MenuInfo->Bottom + 1,
212 "Use \x18 and \x19 to move the highlight to your choice.",
215 MenuInfo->Bottom + 2,
216 "Press ENTER to choose.",
218
219 /* And show the menu footer */
220 if (MenuInfo->MenuFooter)
221 {
223 UiScreenHeight - 4,
224 MenuInfo->MenuFooter,
226 }
227
228 /* Display the boot options if needed */
229 if (MenuInfo->ShowBootOptions)
230 {
232 }
233
235}
VOID DisplayBootTimeOptions(VOID)
Definition: options.c:181
UCHAR UiMenuBgColor
Definition: ui.c:35
UIVTBL UiVtbl
Definition: ui.c:64
VOID UiDrawBackdrop(VOID)
Definition: ui.c:233
UCHAR UiMenuFgColor
Definition: ui.c:34
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
menu info structure
Definition: window.h:276
VOID(* DrawText)(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.h:257
VOID TuiDrawMenuItem(_In_ PUI_MENU_INFO MenuInfo, _In_ ULONG MenuItemNumber)
Definition: tuimenu.c:366
VOID TuiDrawMenuBox(_In_ PUI_MENU_INFO MenuInfo)
Definition: tuimenu.c:342
uint32_t ULONG
Definition: typedefs.h:59

◆ MiniTuiDrawProgressBar()

VOID MiniTuiDrawProgressBar ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom,
_In_ PCSTR  ProgressText 
)

Definition at line 172 of file minitui.c.

178{
179 UiInitProgressBar(Left, Top, Right, Bottom, ProgressText);
180}
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53
VOID UiInitProgressBar(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
Definition: ui.c:389

Referenced by MiniTuiDrawProgressBarCenter().

◆ MiniTuiDrawProgressBarCenter()

VOID MiniTuiDrawProgressBarCenter ( _In_ PCSTR  ProgressText)

Definition at line 147 of file minitui.c.

149{
150 ULONG Left, Top, Right, Bottom, Width, Height;
151
152 /* Build the coordinates and sizes */
153#ifdef NTLDR_PROGRESSBAR
154 Height = 2;
156 Left = 0;
157 Top = UiScreenHeight - Height - 2;
158#else // BTMGR_PROGRESSBAR
159 Height = 3;
160 Width = UiScreenWidth - 4;
161 Left = 2;
162 Top = UiScreenHeight - Height - 3;
163#endif
164 Right = Left + Width - 1;
165 Bottom = Top + Height - 1;
166
167 /* Draw the progress bar */
168 MiniTuiDrawProgressBar(Left, Top, Right, Bottom, ProgressText);
169}
VOID MiniTuiDrawProgressBar(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR ProgressText)
Definition: minitui.c:172
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88

◆ MiniTuiDrawStatusText()

VOID MiniTuiDrawStatusText ( PCSTR  StatusText)

Definition at line 67 of file minitui.c.

68{
69 /* Minimal UI doesn't have a status bar */
70}

◆ MiniTuiSetProgressBarText()

VOID MiniTuiSetProgressBarText ( _In_ PCSTR  ProgressText)

Definition at line 73 of file minitui.c.

75{
76 ULONG ProgressBarWidth;
77 CHAR ProgressString[256];
78
79 /* Make sure the progress bar is enabled */
81
82 /* Calculate the width of the bar proper */
83 ProgressBarWidth = UiProgressBar.Right - UiProgressBar.Left + 1;
84
85 /* First make sure the progress bar text fits */
86 RtlStringCbCopyA(ProgressString, sizeof(ProgressString), ProgressText);
87 TuiTruncateStringEllipsis(ProgressString, ProgressBarWidth);
88
89 /* Clear the text area */
92#ifdef NTLDR_PROGRESSBAR
94#else // BTMGR_PROGRESSBAR
95 UiProgressBar.Bottom - 2, // One empty line between text and bar.
96#endif
98
99 /* Draw the "Loading..." text */
102#ifdef NTLDR_PROGRESSBAR
104#else // BTMGR_PROGRESSBAR
105 UiProgressBar.Bottom - 2, // One empty line between text and bar.
106#endif
107 ProgressString, ATTR(UiTextColor, UiMenuBgColor));
108}
UI_PROGRESS_BAR UiProgressBar
Definition: ui.c:62
UCHAR UiTextColor
Definition: ui.c:36
#define ASSERT(a)
Definition: mode.c:44
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:156
ULONG Top
Definition: ui.h:132
ULONG Bottom
Definition: ui.h:134
BOOLEAN Show
Definition: ui.h:136
ULONG Left
Definition: ui.h:131
ULONG Right
Definition: ui.h:133
VOID TuiDrawCenteredText(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ PCSTR TextString, _In_ UCHAR Attr)
Definition: tui.c:118
VOID TuiTruncateStringEllipsis(_Inout_z_ PSTR StringText, _In_ ULONG MaxChars)
Definition: tui.c:63
char CHAR
Definition: xmlstorage.h:175

◆ MiniTuiTickProgressBar()

VOID MiniTuiTickProgressBar ( _In_ ULONG  SubPercentTimes100)

Definition at line 111 of file minitui.c.

113{
114 ULONG ProgressBarWidth;
115 ULONG FillCount;
116
117 /* Make sure the progress bar is enabled */
119
120 ASSERT(SubPercentTimes100 <= (100 * 100));
121
122 /* Calculate the width of the bar proper */
123 ProgressBarWidth = UiProgressBar.Right - UiProgressBar.Left + 1;
124
125 /* Compute fill count */
126 // FillCount = (ProgressBarWidth * Position) / Range;
127 FillCount = ProgressBarWidth * SubPercentTimes100 / (100 * 100);
128
129 /* Fill the progress bar */
130 /* Draw the percent complete -- Use the fill character */
131 if (FillCount > 0)
132 {
134 UiProgressBar.Left + FillCount - 1, UiProgressBar.Bottom,
135 '\xDB', ATTR(UiTextColor, UiMenuBgColor));
136 }
137 /* Fill the remaining with blanks */
141
144}
VOID TuiUpdateDateTime(VOID)
Definition: tui.c:549

Variable Documentation

◆ MiniTuiVtbl

const UIVTBL MiniTuiVtbl
extern

Definition at line 237 of file minitui.c.

Referenced by UiInitialize(), and UiResetForSOS().