50 #if D4D_STRINGTABLE_PREFIX
55 static int D4D_StringToInt(
const D4D_TCHAR* pText);
65 #if D4D_STRINGTABLE_PREFIX
81 d4d_strTableIndex = i;
110 #if D4D_STRINGTABLE_PREFIX
113 if(originTxt ==
NULL)
116 #if D4D_STRINGTABLE_PREFIX
119 if((tableIx = D4D_StringToInt(&originTxt[1])) < 0)
148 divider = 1000000000;
150 for(tmp_cnt = 0; tmp_cnt < 9; tmp_cnt++)
152 if((value > divider - 1) || (cnt > 1))
155 *pText++ = (
D4D_TCHAR)((value/divider)+
'0');
157 }
else if((pText !=
NULL) && (fill))
170 return (
Byte)(cnt + fill_cnt);
211 for(tmp_cnt = 0; tmp_cnt < 4; tmp_cnt++)
213 if((value > divider - 1) || (cnt > 1))
216 *pText++ = (
D4D_TCHAR)((value/divider)+
'0');
218 }
else if((pText !=
NULL) && (fill))
231 return (
Byte)(cnt + fill_cnt);
276 }
else if((pText !=
NULL) && (fill))
282 if((value > 9) || (cnt > 1))
289 }
else if((pText !=
NULL) && (fill))
300 return (
Byte)(cnt + fill_cnt);
338 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
367 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
381 for(charCntTmp = 0; charCntTmp < charCnt; charCntTmp++)
390 while(*(pTextInt) != 0)
416 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
430 for(charCntTmp = 0; charCntTmp < charCnt; charCntTmp++)
432 if(++char_ix > text_buffer->
printLen)
458 while(*pTextInt != 0)
461 if(++char_ix > text_buffer->
printLen)
464 if(*pTextInt ==
'\t')
502 pText = pString->
pText;
509 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
522 for(charCntTmp = 0; charCntTmp < charCnt; charCntTmp++)
547 while(*pTextInt != 0)
605 if(pDest != pNewText)
606 while(n > 1 && *pNewText)
620 while(n > 1 && fillChar)
622 *(pDest++) = fillChar;
678 if(tmp_txtLen < longTextLen)
681 tmp_MaxLen -= longTextLen;
688 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
709 str_len += (charOff - 1);
711 for(charCntTmp = 0; charCntTmp < charCnt; charCntTmp++)
723 if(tmp_MaxLen - tmp_Len <= 0)
728 tmp_MaxLen -= tmp_Len;
749 for (ch_ix=0; ch_ix<str_len; ++ch_ix)
756 if(tmp_MaxLen - tmp_Len <= 0)
760 tmp_MaxLen -= tmp_Len;
772 while(pLongTextEnd[ch_ix])
786 base_x = p_StrDes->
x;
794 for(base_x = orig_x; base_x < p_StrDes->
x; base_x += pFontType->
scale.
height)
809 base_y = (
D4D_COOR)(p_StrDes->
y + (pFontDescriptor->charBaseLine - (pFontDescriptor->charSize / 3)) * pFontType->
scale.
height);
810 base_x = p_StrDes->
x;
820 #if D4D_LLD_FLUSH_ELEMENT != D4D_FALSE
826 #if D4D_STRINGTABLE_PREFIX
836 static int D4D_StringToInt(
const D4D_TCHAR* pText)
857 res += (pText[i] -
'0') * tens;
D4D_INDEX buffSize
size of text buffer array
D4D_WCHAR D4D_TCHAR
Type definition of eGUI character (it depends on UNICODE setting if this is D4D_CHAR or D4D_WCHAR)...
D4D_FONT_TYPE * pFontType
D4D_OBJECT_SYS_FUNCTION * pObjFunc
The pointer on object system functions.
void D4D_InvalidateScreen(const D4D_SCREEN *pScreen, D4D_BOOL bComplete)
The function mark the screen and its abject as "redraw pending".
D4DLOCALE_GET_TRANSLATE_STR_LEN D4DLOCALE_GetTranslateStrLength
Pointer to Get Translate String Length Function.
D4D_INDEX printLen
Length of string that should be used (printed).
signed long sLWord
Type definition of sLWord (signed 32-bit).
D4D_COOR D4D_LCD_PrintChr(D4D_TCHAR ch, D4D_PRINT_DESC *p_CharDes)
void(* D4DLCD_FlushBuffer)(D4DLCD_FLUSH_MODE mode)
The LCD driver flush function.
void D4D_FillRectXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color)
Function draw filled rectangle on the screen.
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
D4D_COOR tabOffset
Start offset of tabulator.
The string type. This structure contains all properties about string in eGUI.
D4D_TCHAR * D4D_GetInternalStringPointer(const D4D_TCHAR *originTxt)
The function gets the real internal pointer to string.
D4D_FONT_PROPERTIES properties
D4D_FONT fontId
index of used font
The flush after one basic element is draw.
#define D4D_FNT_PRTY_UNDERLINE_MASK
Font Underline property masks.
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
D4D_INDEX D4D_GetTextMaxLength(D4D_STRING *pString, D4D_COOR maxWidth)
The function find out the maximal text length that fits to maximal pixel width.
D4D Driver main header file.
#define D4D_FNT_PRTY_UNDERLINE_DOT_MASK
Dot Line Underline Text Property mask.
D4D_COOR D4D_GetTextBuffWidthTab(D4D_STRING *text_buffer, D4D_TAB *pTab)
The function returns width of text in pixels, also with tab table.
D4D Driver private header file.
Byte D4D_SprintDecU32(LWord val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal unsigned 32 bit number to string.
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
Byte D4D_COOR
Type definition of eGUI coordination variables.
#define D4D_STR_TABLE_MAX_CNT
This is maximal count of string table. If not defined, it sets to 4 string tables (languages) as a de...
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
const D4D_STRING_TABLE d4d_StringTable[]
Byte D4D_SprintDecS8(sByte val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal signed 8 bit number to string.
D4D_FONT_DESCRIPTOR * pFontDescriptor
D4D_INDEX D4D_GetTextLength(D4D_TCHAR *pText)
The function returns lenght of text.
#define D4D_FNT_PRTY_UNDERLINE_LINE_MASK
One Line Underline Text Property mask.
#define D4D_EXTSRC_BUFF_SIZE
This macro is used to specify size of buffer that is using when external file support is enabled...
#define NULL
Type definition of null pointer.
D4D_TCHAR * pText
pointer to text array
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
D4D_SCREEN * D4D_GetActiveScreen(void)
Returns pointer to current active screen.
void D4D_ChangeText(D4D_STRING *pBuff, D4D_TCHAR *pNewText, D4D_TCHAR fillChar)
signed short sWord
Type definition of sWord (signed 16-bit).
#define D4D_FNT_PRTY_TRANSPARENT_MASK
LWord D4D_GetCurrentStringId(void)
const D4DLOCALE_FUNCTIONS d4d_extsrcLocale
Type definition of eGUI tabulation structure.
LWord D4D_INDEX
Type definition of eGUI general index variables.
The object main structure type definition.
signed char sByte
Type definition of sByte (signed 8-bit).
Byte D4D_SprintDecS32(sLWord val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal signed 32 bit number to string.
Byte D4D_SprintDecS16(sWord val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal signed 16 bit number to string.
void D4D_LCD_PrintStr(D4D_PRINT_DESC *p_StrDes)
void D4D_ChangeStringTable(LWord stringId)
#define D4D_FNT_PRTY_STRIKETHROUGH_SHIFT
Strike through property bits shift.
const D4DLCD_FUNCTIONS D4D_LLD_LCD
LWord D4D_BOOL
Type definition of eGUI boolean.
Byte D4D_SprintDecU8(Byte val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal unsigned 8 bit number to string.
#define D4D_IsDigit(x)
Macro that returns if the input cahr is digit or not. Here is an example demonstrating how to used it...
struct D4D_STRING_S *(* GetTextBuffer)(struct D4D_OBJECT_S *pObj)
Object get text buffer function pointer (the function returns the pointer of the object text buffer...
D4D_COOR D4D_GetTextWidth(D4D_FONT ix, D4D_TCHAR *pText)
The function returns width of text in pixels.
D4D_FONT_SIZE D4D_GetCharWidth(D4D_FONT ix, D4D_TCHAR ch)
#define D4D_STRINGTABLE_PREFIX
Byte d4d_extsrcBuffer[D4D_EXTSRC_BUFF_SIZE]
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
#define D4D_FNT_PRTY_STRIKETHROUGH_MASK
Font Strike through property masks.
D4D driver - resistive touch screen driver function header file.
D4D_COOR D4D_GetNextTab(D4D_TAB *pTab, D4D_COOR pos)
Byte D4D_SprintDecU16(Word val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal unsigned 16 bit number to string.
D4DLOCALE_TRANSLATE_STR D4DLOCALE_TranslateStr
Pointer to Translate String Function.
void D4D_SetText(D4D_OBJECT_PTR pObject, D4D_TCHAR *pText)
The function change the text in main object text buffer.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
unsigned short Word
Type definition of Word (unsigned 16-bit).
D4D_INDEX printOff
Offset of string that should be used (printed).