ReactOS  0.4.13-dev-247-g0f29b3f
gui.h
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #pragma once
21 
22 #define TUI_SCREEN_MEM 0xB8000
23 #define TITLE_BOX_CHAR_HEIGHT 5
24 
26 //
27 // Graphical User Interface Functions
28 //
30 VOID GuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
31 VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
32 VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
33 VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr); // Draws a box around the area specified
34 VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
35 VOID GuiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
36 VOID GuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen
37 VOID GuiUpdateDateTime(VOID); // Updates the date and time
38 VOID GuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later
39 VOID GuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
40 VOID GuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button
41 VOID GuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources
42 VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled
43 
44 UCHAR GuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value
45 UCHAR GuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value
46 
48 //
49 // Menu Functions
50 //
52 BOOLEAN GuiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem);
53 
54 extern const UIVTBL GuiVtbl;
const UIVTBL GuiVtbl
Definition: gui.c:85
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:109
#define Y(I)
static COORD Position
Definition: mouse.c:34
unsigned char * PUCHAR
Definition: retypes.h:3
VOID GuiSaveScreen(PUCHAR Buffer)
Definition: gui.c:55
VOID GuiMessageBox(PCSTR MessageText)
Definition: gui.c:63
UCHAR GuiTextToColor(PCSTR ColorText)
Definition: gui.c:75
VOID GuiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PUCHAR Text, UCHAR Attr)
Definition: gui.c:43
VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr)
Definition: gui.c:27
long LONG
Definition: pedump.c:60
unsigned char BOOLEAN
Definition: bufpool.h:45
BOOLEAN GuiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG *SelectedMenuItem)
VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
Definition: gui.c:39
VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr)
Definition: gui.c:35
VOID GuiMessageBoxCritical(PCSTR MessageText)
Definition: gui.c:67
unsigned char UCHAR
Definition: xmlstorage.h:181
Definition: ui.h:117
Definition: range.c:43
static LPHIST_ENTRY Bottom
Definition: history.c:54
VOID GuiRestoreScreen(PUCHAR Buffer)
Definition: gui.c:59
VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
Definition: gui.c:31
VOID GuiUpdateDateTime(VOID)
Definition: gui.c:51
UCHAR GuiTextToFillStyle(PCSTR FillStyleText)
Definition: gui.c:80
unsigned int ULONG
Definition: retypes.h:1
VOID GuiDrawProgressBar(ULONG Position, ULONG Range)
Definition: gui.c:71
const char * PCSTR
Definition: typedefs.h:51
VOID GuiDrawBackdrop(VOID)
Definition: gui.c:23
VOID GuiDrawStatusText(PCSTR StatusText)
Definition: gui.c:47
static LPHIST_ENTRY Top
Definition: history.c:53
char * Text
Definition: combotst.c:136