93 #define _calc (*((D4D_TXTBX_TMP_VAL*)d4d_scratchPad))
105 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
123 if(
_calc.lineCount > tmpIx)
124 _calc.lineCount = tmpIx;
137 if(wordDesc->charCnt)
154 wordDesc->pixLen = (
D4D_COOR)(tab - wordDesc->cur_pos);
183 wordDesc->pixLen = 0;
184 wordDesc->charCnt = 0;
191 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
211 for(charCntTmp = 0; charCntTmp < charCnt; charCntTmp++)
226 pTextInt += wordDesc->offset;
253 len = wordDesc->pixLen;
254 wordDesc->pixLen = 0;
256 wordDesc->charCnt = 0;
263 #if D4D_EXTSRC_TEXT_ENABLE != D4D_FALSE
279 for(charCntTmp = 0; charCntTmp < charCnt; charCntTmp++)
284 if((wordDesc->pixLen + tmp_len) > len)
287 wordDesc->pixLen += tmp_len;
296 pTmpWord += wordDesc->offset;
303 if((wordDesc->pixLen + tmp_len) > len)
306 wordDesc->pixLen += tmp_len;
320 D4D_TXTBX_WORD_DESC tmp_wordDesc;
324 tmp_wordDesc.fnt = fnt;
325 tmp_wordDesc.pWord = pText;
326 tmp_wordDesc.pTab = pTab;
327 tmp_wordDesc.cur_pos = 0;
328 tmp_wordDesc.offset = offset;
332 if((tmp_len + tmp_wordDesc.pixLen) > len)
337 tmp_wordDesc.pixLen = len;
344 tmp_len += tmp_wordDesc.pixLen;
345 res_charCnt += tmp_wordDesc.charCnt;
347 if(tmp_wordDesc.newLine)
351 tmp_wordDesc.offset += tmp_wordDesc.charCnt;
352 tmp_wordDesc.cur_pos = tmp_len;
355 return (
D4D_INDEX)(tmp_wordDesc.charCnt + res_charCnt);
380 textIx += lineCharCnt;
418 textIx += lineCharCnt;
508 tmp_point =
_calc.txtGeom.pnt;
509 tmp_size.
cx =
_calc.txtGeom.sz.cx;
522 for(line_cnt = 0; line_cnt <
_calc.lineCount; line_cnt++)
530 tmp_point.
y += tmp_size.
cy;
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_OBJECT * D4D_GetParentObject(D4D_OBJECT *pObject)
#define D4D_KEY_SCANCODE_ESC
This macro is used to specify Key Scan Code ESC. If not defined, it sets to 0x01 as a default...
D4D_COLOR D4D_ObjectGetBckgFillColor(D4D_OBJECT *pObj)
Function return object current fill background color.
D4D_STRING * D4D_TextBoxGetTextBuffer(D4D_OBJECT *pThis)
D4D_TEXT_PROPERTIES text_properties
Text properties structure.
D4D_INDEX printLen
Length of string that should be used (printed).
Type definition of eGUI point structure.
On Init message - is send for first time when the object is inicialized.
D4D object messages structure.
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
const D4D_OBJECT_SYS_FUNCTION d4d_textboxSysFunc
D4D_COOR * pTabTable
Pointer to tabulator table.
Mouse Whell Move Down message - is send in case that mouse whell move down is detected on this object...
#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_COLOR D4D_ObjectGetForeFillColor(D4D_OBJECT *pObj)
Function return object current fill fore color.
static void D4D_TextBoxValue2Coor(D4D_OBJECT *pThis)
void D4D_DrawTextRectTab(D4D_POINT *ppt, D4D_SIZE *psz, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
Function draw text with TAB function in rectangle.
D4D_TCHAR * D4D_GetInternalStringPointer(const D4D_TCHAR *originTxt)
The function gets the real internal pointer to string.
D4D_FONT fontId
index of used font
static D4D_BOOL D4D_TextBoxGetWordSpec(D4D_TXTBX_WORD_DESC *wordDesc)
void D4D_TextBoxChangeText(D4D_OBJECT *pObject, D4D_TCHAR *pText)
The function change the text of the text box.
Set Focus message - is send when the object is getting focus.
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
void D4D_DrawFrame(D4D_OBJECT *pObject, D4D_COLOR clrT, D4D_COLOR clrB)
Function draw standard object frame based on the object settings and current state.
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
Key Up message - is send when the object get new Key Up event.
D4D Driver main header file.
#define D4D_KEY_SCANCODE_ENTER
This macro is used to specify Key Scan Code ENTER. If not defined, it sets to 0x1C as a default...
static D4D_BOOL D4D_TextBoxGetCharsToLine(D4D_TXTBX_WORD_DESC *wordDesc)
D4D_OBJECT_FLAGS flags
runtime object flags
The string properties type. This structure contains as Font as Text properties.
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
Mouse Left Button Release message - is send in case that mouse left release is detected on this objec...
D4D Driver private header file.
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
D4D_COOR cx
Size in axis X (width)
Byte D4D_COOR
Type definition of eGUI coordination variables.
D4D_POINT position
Position on the screen/object.
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
D4D_COOR radius
Object corners radius.
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
#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.
#define D4D_TXTBX_SCRLBR_WIDTH
This is text box embedded scroll bar width If not defined, it sets to 20 pixels as a default...
#define D4D_GET_TEXTBOX(pObj)
D4D_TCHAR * pText
pointer to text array
static D4D_INDEX D4D_TextBoxGetMaxLineChars(D4D_TCHAR *pText, D4D_INDEX offset, D4D_TAB *pTab, D4D_COOR len, D4D_FONT fnt)
D4D_STR_PROPERTIES * str_properties
pointer to string properties
D4D_COOR y
Coordination in axis Y.
#define D4D_OBJECT_F_NOTINIT
D4D_MSGID nMsgId
Type of message.
D4D_SIZE size
Size of the object.
#define D4D_ROUND_CORNER_ENABLE
This macro is used to enable the round corners feature. If not defined, the round corners are disable...
const D4DLOCALE_FUNCTIONS d4d_extsrcLocale
static D4D_INDEX D4D_TextBoxGetLineCount(D4D_OBJECT *pThis)
void D4D_TextBoxRefreshAll(D4D_OBJECT *pObject)
The function reinitialize whole object.
static void D4D_TextBoxOnDraw(D4D_MESSAGE *pMsg)
D4D_KEY_SCANCODE key
There will be stored only code of key without release / press information - is valid with D4D_MSG_KEY...
Type definition of eGUI tabulation structure.
D4D_POINT D4D_GetClientToScreenPoint(D4D_OBJECT *pObject, D4D_POINT *nClientPoint)
The function convert client point on the screen to the global screen point.
LWord D4D_INDEX
Type definition of eGUI general index variables.
static D4D_INDEX D4D_TextBoxFindLineStartChar(D4D_OBJECT *pThis, D4D_INDEX line)
The object main structure type definition.
void D4D_CaptureKeys(D4D_OBJECT_PTR pObj)
Function switch on capturing the keys to objects.
Draw message - is send when the object should be redrawed.
D4D_INDEX firstShowedCharIx
#define D4D_TXTBX_SCRLBR_STEP
This is text box embedded scroll bar change step If not defined, it sets to 2 step as a default...
static void D4D_TextBoxOnInit(D4D_OBJECT *pObject)
void D4D_ComputeGeometry(D4D_GEOMETRY *pGeometry, D4D_OBJECT *pObject)
#define D4D_GET_TEXTBOX_DATA(pObj)
D4D_COOR cy
Size in axis Y (height)
The object system function needed for each object - this is part of D4D_OBJECT main structure...
void D4D_TextBoxScrollBarsFeedBack(D4D_OBJECT *pThis, D4D_INDEX old_position, D4D_INDEX new_position)
#define D4D_OBJECT_F_VISIBLE
Object after initialization is visible on the screen.
Touched message - is send when the object is touched by touch screen driver.
LWord D4D_BOOL
Type definition of eGUI boolean.
#define D4D_UNUSED(x)
Macro used just for notify compiler that the input parameter is not used.
Type definition of eGUI size structure.
#define D4D_GET_TEXTBOX_SCROLL_BAR_HOR(pObj)
static D4D_BOOL D4D_TextBoxGetWordSpecInt(D4D_TCHAR ch, D4D_TXTBX_WORD_DESC *wordDesc)
static D4D_BOOL D4D_TextBoxScrollBarSetup(D4D_OBJECT *pObject)
D4D_FONT_SIZE D4D_GetCharWidth(D4D_FONT ix, D4D_TCHAR ch)
Kill Capture message - is send when the object is losing capture keys status.
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
void D4D_FillRRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
Type definition of eGUI geometry structure.
Set Capture message - is send when the object is getting capture keys status.
void D4D_TextBoxOnMessage(D4D_MESSAGE *pMsg)
Byte d4d_extsrcBuffer[D4D_EXTSRC_BUFF_SIZE]
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
D4D_COOR D4D_GetNextTab(D4D_TAB *pTab, D4D_COOR pos)
Byte D4D_KEY_SCANCODE
Type definition of eGUI keys scan code.
Byte D4D_OBJECT_DRAWFLAGS
Drawing object flags type, handled to object in D4D_MSG_DRAW events.
LWord D4D_COLOR
Type definition of eGUI color variables.
D4DLOCALE_TRANSLATE_STR D4DLOCALE_TranslateStr
Pointer to Translate String Function.
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
D4D_FONT_PROPERTIES font_properties
Font properties structure.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
Mouse Whell Move Up message - is send in case that mouse whell move up is detected on this object...
D4D_INDEX printOff
Offset of string that should be used (printed).
Kill Focus message - is send when the object is losing focus.
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.