69 } D4D_EDIT_BOX_TMP_VAL;
71 #define _calc (*((D4D_EDIT_BOX_TMP_VAL*)d4d_scratchPad))
118 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
137 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
156 tmp_point.
x += widthText;
160 if((widthText + widthChar) >
_calc.contentGeom.sz.cx)
171 if (
_calc.contentGeom.sz.cy > tmp_size.
cy)
172 tmp_point.
y += (
_calc.contentGeom.sz.cy - tmp_size.
cy) / 2;
177 if ((tmp_point.
x + pThis->
radius/2) < (
_calc.contentGeom.pnt.x +
_calc.contentGeom.sz.cx - 1))
178 tmp_point.
x += pThis->
radius/2;
191 tmp_size.
cx = widthChar;
354 if(pData->
curPos >= max_size)
418 pText[i] = pText[i+1];
506 if(pData->
curPos == newPos)
516 if(pData->
curPos < newPos)
521 while(i && (!pText[i]))
550 if(pData->
curPos > newPos)
566 while(currentLast < newPos)
578 if((width + currentWidth) > maxWidth)
581 currentWidth += width;
699 D4D_EditBoxOnTouch(pMsg);
708 #if (D4D_EDIT_BOX_CURSOR_BLINK_TICK_COUNTER > 0)
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)...
static void D4D_EditBoxTimeTick(D4D_MESSAGE *pMsg)
#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...
#define D4D_KEY_SCANCODE_RIGHT
This macro is used to specify Key Scan Code RIGHT. If not defined, it sets to 0x4D as a default...
#define D4D_GET_EDIT_BOX_DATA(pEditBox)
D4D_COLOR D4D_ObjectGetForeColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current fore color.
#define D4D_KEY_SCANCODE_UP
This macro is used to specify Key Scan Code UP. If not defined, it sets to 0x51 as a default...
void D4D_FillRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color)
Function draw filled rectangle on the screen.
D4D_INDEX printLen
Length of string that should be used (printed).
Type definition of eGUI point structure.
D4D_COOR left
Margin of left side.
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.
#define D4D_EDIT_BOX_FLAGS_CURSORSTATE
#define D4D_EDIT_BOX_CURSOR_BLINK_TICK_COUNTER
This is definition of edit box cursor blink time (in ticks of eGUI time ticks - D4D_TimeTickPut). If not defined, it sets to ( 10 ) as a default.
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
The string type. This structure contains all properties about string in eGUI.
#define D4D_DrawTextRect(ppt, psz, buffText, colorText, colorBkgd)
Function that draw text into defined rectangle on the screen.
const D4D_OBJECT_SYS_FUNCTION d4d_editBoxSysFunc
D4D_TCHAR * D4D_GetInternalStringPointer(const D4D_TCHAR *originTxt)
The function gets the real internal pointer to string.
On Change done (complete change is finished.
D4D_FONT fontId
index of used font
Time Tick Occur message - is send with each time tick to object.
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.
D4D_INDEX D4D_GetTextMaxLength(D4D_STRING *pString, D4D_COOR maxWidth)
The function find out the maximal text length that fits to maximal pixel width.
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
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...
D4D_OBJECT_FLAGS flags
runtime object flags
void D4D_EditBoxOnMessage(D4D_MESSAGE *pMsg)
Auto Touched message - is send when the object is still keep touch by touch screen driver ...
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
#define D4D_SCRATCHPAD_SIZE
Call back function raised by any new input event (touch, mouse, keys).
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.
#define D4D_KEY_SCANCODE_DOWN
This macro is used to specify Key Scan Code DOWN. If not defined, it sets to 0x50 as a default...
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
#define D4D_EDIT_BOX_FLAGS_REDRAWTEXT
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.
static void D4D_EditBoxOnDraw(D4D_MESSAGE *pMsg)
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
D4D_COOR radius
Object corners radius.
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
static void D4D_EditBoxValue2Coor(D4D_OBJECT *pThis)
D4D_COOR right
Margin of right side.
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
#define NULL
Type definition of null pointer.
D4D_CLR_SCHEME * D4D_ObjectGetScheme(D4D_OBJECT *pObj)
Function return the pointer to current use object scheme of object.
D4D_TCHAR * pText
pointer to text array
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
void D4D_EditBoxClearAll(D4D_OBJECT_PTR pObj)
The function clear whole edit box data.
D4D_COOR y
Coordination in axis Y.
D4D_COLOR bckgFocus
The object background color in focused state.
D4D_SCREEN * D4D_GetActiveScreen(void)
Returns pointer to current active screen.
#define D4D_OBJECT_F_NOTINIT
D4D_OBJECT_PTR D4D_GetFocusedObject(const D4D_SCREEN *pScreen)
The function returns pointer to object that is focused in given screen.
#define D4D_EDIT_BOX_FLAGS_MOVECURSOR
D4D_INDEX D4D_EditBoxSetCursor(D4D_OBJECT_PTR pObj, D4D_INDEX newPos)
The function chenge the cursor position to new one.
D4D_MSGID nMsgId
Type of message.
D4D_SIZE size
Size of the object.
#define D4D_KEY_SCANCODE_LEFT
This macro is used to specify Key Scan Code LEFT. If not defined, it sets to 0x4B as a default...
D4D_TCHAR * D4D_EditBoxGetText(D4D_OBJECT_PTR pObj)
The function returns the pointer to the edit box text buffer.
D4D_KEY_SCANCODE key
There will be stored only code of key without release / press information - is valid with D4D_MSG_KEY...
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.
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.
static D4D_BOOL D4D_EditBoxPutCharInt(D4D_OBJECT_PTR pObj, D4D_TCHAR ch)
D4D_EDIT_BOX_DATA * pData
void D4D_ComputeGeometry(D4D_GEOMETRY *pGeometry, D4D_OBJECT *pObject)
D4D_COOR cy
Size in axis Y (height)
The object system function needed for each object - this is part of D4D_OBJECT main structure...
static void D4D_EditBoxOnKeyUp(D4D_MESSAGE *pMsg)
static void D4D_EditBoxOnInit(D4D_MESSAGE *pMsg)
D4D_EDIT_BOX_ON_EVENT pOnEvent
Touched message - is send when the object is touched by touch screen driver.
LWord D4D_BOOL
Type definition of eGUI boolean.
Type definition of eGUI size structure.
#define D4D_EDIT_BOX_FLAGS_CHANGETEXT
#define D4D_DrawTextRRect(ppt, psz, buffText, colorText, colorBkgd, radius)
Function that draw text into defined rectangle on the screen with corner radius.
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_BOOL D4D_EditBoxPutString(D4D_OBJECT_PTR pObj, D4D_TCHAR *pText)
The function puts string on cursor position and updates cursor.
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
void D4D_EnableTimeTicks(D4D_OBJECT_PTR pObj, D4D_BOOL bEnable)
Function enable or diasble receiving timeticks for an OBJECT.
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.
#define D4D_EDIT_BOX_FLAGS_REDRAWCURSOR
Type definition of eGUI geometry structure.
Set Capture message - is send when the object is getting capture keys status.
D4D_BOOL D4D_EditBoxPutChar(D4D_OBJECT_PTR pObj, D4D_TCHAR ch)
The function puts one char on cursor position and updates cursor.
#define D4D_GET_EDIT_BOX(pObj)
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
D4D_MARGIN * pMargin
Object inner margin.
Key Down message - is send when the object get new Key Down event.
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.
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
D4D_INDEX printOff
Offset of string that should be used (printed).
#define D4D_EDIT_BOX_FLAGS_FULL
D4D_INDEX D4D_EditBoxGetCursor(D4D_OBJECT_PTR pObj)
The function returns the cursor position.
D4D_COOR x
Coordination in axis X.
Kill Focus message - is send when the object is losing focus.
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.
D4D_OBJECT * D4D_GetCapturedObject(void)
Function returns the current keys capturing object pointer.