2017-05-29 07:54:57 +00:00
|
|
|
#ifndef _INCLUDE_GUI_FONT_H_
|
|
|
|
#define _INCLUDE_GUI_FONT_H_
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2019-02-24 15:03:05 +00:00
|
|
|
//= Include files. =//
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2017-08-02 14:24:26 +00:00
|
|
|
#include "SGUI_Common.h"
|
|
|
|
#include "SGUI_Basic.h"
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= User Macro definition. =//
|
|
|
|
//=======================================================================//
|
2017-05-29 07:54:57 +00:00
|
|
|
#define FONT_LIB_ADDR 0X00000
|
|
|
|
// Max font size is 64 pix, maximum of font data size is 64 * 8 = 512 Bytes.
|
|
|
|
#define TEXT_NUMBER_STR_LENGTH_MAX (12)
|
|
|
|
#define TEXT_PLACEHOLDER_CHARACTER ('*')
|
2019-12-01 15:04:02 +00:00
|
|
|
#define SGUI_IS_VISIBLE_CHAR(C) ((C>0x1F) && (C<0x7F))
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2020-08-10 08:31:34 +00:00
|
|
|
#define SGUI_TEXT_DECODER_ASCII SGUI_Text_StepNext_ASCII
|
|
|
|
#define SGUI_TEXT_DECODER_GB2312 SGUI_Text_StepNext_GB2312
|
2020-08-12 14:14:47 +00:00
|
|
|
#define SGUI_TEXT_DECODER_UTF8 SGUI_Text_StepNext_UTF8
|
2020-08-10 08:31:34 +00:00
|
|
|
|
|
|
|
#define SGUI_TEXT_INDEXMAPPER_DIRECT SGUI_Text_IndexMapper_Direct
|
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= Data type definition. =//
|
|
|
|
//=======================================================================//
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= Public variable declaration. =//
|
|
|
|
//=======================================================================//
|
2019-12-09 14:11:37 +00:00
|
|
|
extern SGUI_CSZSTR SGUI_EMPTY_STRING;
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= Public function declaration. =//
|
|
|
|
//=======================================================================//
|
2019-12-01 15:04:02 +00:00
|
|
|
void SGUI_Text_GetTextExtent(SGUI_CSZSTR cszTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_AREA_SIZE* pstTextExtent);
|
2019-12-25 15:23:13 +00:00
|
|
|
void SGUI_Text_DrawText(SGUI_SCR_DEV* pstDeviceIF, SGUI_CSZSTR cszTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_RECT* pstDisplayArea, SGUI_POINT* pstInnerPos, SGUI_DRAW_MODE eFontMode);
|
|
|
|
SGUI_SIZE SGUI_Text_DrawMultipleLinesText(SGUI_SCR_DEV* pstDeviceIF, SGUI_CSZSTR szTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_RECT* pstDisplayArea, SGUI_INT iTopOffset, SGUI_DRAW_MODE eFontMode);
|
2019-12-01 15:04:02 +00:00
|
|
|
SGUI_SIZE SGUI_Text_GetMultiLineTextLines(SGUI_CSZSTR cszText, const SGUI_FONT_RES* pstFontRes, SGUI_SIZE uiDisplayAreaWidth);
|
2020-08-10 08:31:34 +00:00
|
|
|
SGUI_CSZSTR SGUI_Text_StepNext_ASCII(SGUI_CSZSTR cszSrc, SGUI_UINT32* puiCode);
|
|
|
|
SGUI_CSZSTR SGUI_Text_StepNext_GB2312(SGUI_CSZSTR cszSrc, SGUI_UINT32* puiCode);
|
2020-08-12 14:14:47 +00:00
|
|
|
SGUI_CSZSTR SGUI_Text_StepNext_UTF8(SGUI_CSZSTR cszSrc, SGUI_UINT32* puiCode);
|
2020-08-10 08:31:34 +00:00
|
|
|
SGUI_UINT32 SGUI_Text_IndexMapper_Direct(SGUI_UINT32 uiCode);
|
2017-05-29 07:54:57 +00:00
|
|
|
|
|
|
|
#endif
|