MiniGUI API Reference (MiniGUI-Standalone)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Macros | |
#define | SYSLOGFONT_DEFAULT 0 |
#define | SYSLOGFONT_WCHAR_DEF 1 |
#define | SYSLOGFONT_FIXED 2 |
#define | SYSLOGFONT_CAPTION 3 |
#define | SYSLOGFONT_MENU 4 |
#define | SYSLOGFONT_CONTROL 5 |
Functions | |
static PLOGFONT GUIAPI | GetSystemFont (int font_id) |
Gets the system logical font through an font identifier. More... | |
MG_EXPORT int GUIAPI | GetSysFontMaxWidth (int font_id) |
Gets the maximal width of a single-byte character of a system font. More... | |
MG_EXPORT int GUIAPI | GetSysFontAveWidth (int font_id) |
Gets the average width of a single-byte character of a system font. More... | |
MG_EXPORT int GUIAPI | GetSysFontHeight (int font_id) |
Gets the height of a single-byte character of a system font. More... | |
MG_EXPORT const char *GUIAPI | GetSysCharset (BOOL wchar) |
Gets the current system charset. More... | |
MG_EXPORT int GUIAPI | GetSysCharHeight (void) |
Gets the height of a character of the default system font. More... | |
MG_EXPORT int GUIAPI | GetSysCharWidth (void) |
Gets the width of a single-byte character of the default system font. More... | |
MG_EXPORT int GUIAPI | GetSysCCharWidth (void) |
Gets the width of a multi-byte character of the default system font. More... | |
MiniGUI creates a few system fonts to draw menu text, window caption, or other general items. MiniGUI at least creates two system fonts: one mono-space logical font for single-byte charset, and one mono-space logical font for multi-byte charset. For the multi-byte charset, the width of one multi-byte character should be equal to the width of two single-byte characters.
#define SYSLOGFONT_CAPTION 3 |
#define SYSLOGFONT_CONTROL 5 |
#define SYSLOGFONT_DEFAULT 0 |
#define SYSLOGFONT_FIXED 2 |
#define SYSLOGFONT_MENU 4 |
#define SYSLOGFONT_WCHAR_DEF 1 |
int GUIAPI GetSysCCharWidth | ( | void | ) |
Gets the width of a multi-byte character of the default system font.
This function returns the width of a multi-byte character of the default system font. MiniGUI uses mono-space font as the system default font.
Referenced by GetSystemFont().
int GUIAPI GetSysCharHeight | ( | void | ) |
Gets the height of a character of the default system font.
This function returns the height of a character of the system default font. MiniGUI uses mono-space font as the default system font.
Normally, the width of one multi-byte character is equal to the width of two single-byte character when using the default system font.
Referenced by GetSystemFont().
const char *GUIAPI GetSysCharset | ( | BOOL | wchar | ) |
Gets the current system charset.
This function gets the current system charset and returns the charset name. By default, the system charset is ISO8859-1 (for single-byte charset) or GB2312.1980-0 (for wide charset), but you can change it by modifying MiniGUI.cfg.
wchar | Whether to retrieve the wide charset supported currently. |
Referenced by GetSystemFont().
int GUIAPI GetSysCharWidth | ( | void | ) |
Gets the width of a single-byte character of the default system font.
This function returns the width of a single-byte character of the default system font. MiniGUI uses mono-space font as the default system font, but you can specify a different font to output text in windows of MiniGUI.
Referenced by GetSystemFont().
int GUIAPI GetSysFontAveWidth | ( | int | font_id | ) |
Gets the average width of a single-byte character of a system font.
This function returns the average width of a single-byte character of one system font.
font_id | The identifier of a system font. |
Referenced by GetSystemFont().
int GUIAPI GetSysFontHeight | ( | int | font_id | ) |
Gets the height of a single-byte character of a system font.
This function returns the height of a single-byte character of one system font.
font_id | The identifier of a system font. |
Referenced by GetSystemFont().
int GUIAPI GetSysFontMaxWidth | ( | int | font_id | ) |
Gets the maximal width of a single-byte character of a system font.
This function returns the maximal width of a single-byte character of one system font.
font_id | The identifier of a system font. |
Referenced by GetSystemFont().
|
inlinestatic |
Gets the system logical font through an font identifier.
This function returns the system logical font through the font identifier font_id.
font_id | The identifier of a system font, can be one of the following values:
|
Definition at line 6321 of file gdi.h.
References GetSysCCharWidth(), GetSysCharHeight(), GetSysCharset(), GetSysCharWidth(), GetSysFontAveWidth(), GetSysFontHeight(), GetSysFontMaxWidth(), and NULL.