System charset and font operations
[GDI functions]

Defines

Functions


Detailed Description

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 Documentation

#define SYSLOGFONT_CAPTION   3
See also:
GetSystemFont

Definition at line 6262 of file gdi.h.

#define SYSLOGFONT_CONTROL   5
See also:
GetSystemFont

Definition at line 6274 of file gdi.h.

#define SYSLOGFONT_DEFAULT   0
See also:
GetSystemFont

Definition at line 6244 of file gdi.h.

#define SYSLOGFONT_FIXED   2
See also:
GetSystemFont

Definition at line 6256 of file gdi.h.

#define SYSLOGFONT_MENU   4
See also:
GetSystemFont

Definition at line 6268 of file gdi.h.

#define SYSLOGFONT_WCHAR_DEF   1
See also:
GetSystemFont

Definition at line 6250 of file gdi.h.


Function Documentation

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.

Returns:
The width of multi-byte character of the default system font.
See also:
GetSysCharHeight, GetSysCharWidth
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.

Returns:
The character height of the default system font.
See also:
GetSysCharWidth, GetSysCCharWidth
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.

Parameters:
wchar Whether to retrieve the wide charset supported currently.
Returns:
The read-only buffer of charset name. If you pass wchar TRUE, This function may return NULL, if there is not any wide charset supported.
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.

Returns:
The width of single-byte character of the default system font.
See also:
GetSysCharHeight, GetSysCCharWidth, SelectFont, CreateLogFont
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.

Parameters:
font_id The identifier of a system font.
Returns:
The average width of single-byte character of the default system font.
See also:
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.

Parameters:
font_id The identifier of a system font.
Returns:
The height of single-byte character of the default system font.
See also:
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.

Parameters:
font_id The identifier of a system font.
Returns:
The maximal width of single-byte character of the default system font.
See also:
GetSystemFont
PLOGFONT GUIAPI GetSystemFont ( int  font_id  )  [inline, static]

Gets the system logical font through an font identifier.

This function returns the system logical font through the font identifier font_id.

Parameters:
font_id The identifier of a system font, can be one of the following values:

  • SYSLOGFONT_DEFAULT
    The default system logical font in single-byte charset, must be rbf.
  • SYSLOGFONT_WCHAR_DEF
    The default system logical font in multi-byte charset, must be rbf.
  • SYSLOGFONT_FIXED
    The fixed space system logical font.
  • SYSLOGFONT_CAPTION
    The system logical font used to draw caption text.
  • SYSLOGFONT_MENU
    The system logical font used to draw menu items.
  • SYSLOGFONT_CONTROL
    The system logical font used to draw controls.
Returns:
The pointer to the system logical font. NULL on error.

Definition at line 6304 of file gdi.h.

References NULL.

Generated on Thu Apr 7 15:58:38 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3