79 #define _calc (*((D4D_CNSL_TMP_VAL*)d4d_scratchPad))
91 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
126 while((pText[result] != 0) && ((result + startOffset) < maxLenght))
128 if(tmp_textWidth >= (
_calc.txtGeom.sz.cx - 4))
189 tmp_point =
_calc.txtGeom.pnt;
190 tmp_size.
cx =
_calc.txtGeom.sz.cx;
197 for(line_cnt = 0; line_cnt <
_calc.charArrSize.cy; line_cnt++)
202 tmp_point.
y += tmp_size.
cy;
214 if(tmp_font_proporcional)
224 tmp_point.
y += tmp_size.
cy;
250 if(tmp_font_proporcional)
264 tmp_point.
x +=
_calc.txtGeom.pnt.x;
525 for(i = 0; i < j; j++)
633 *(tmp_charAdrr++) = 0;
826 #if (D4D_CNSL_CURSOR_BLINK_TICK_COUNTER > 0)
D4D_INDEX buffSize
size of text buffer array
static void D4D_ConsoleTimeTick(D4D_MESSAGE *pMsg)
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.
static void D4D_CnslUpdateScrollbars(D4D_OBJECT *pThis)
D4D_FONT_TYPE * D4D_GetFont(D4D_FONT ix)
D4D_TEXT_PROPERTIES text_properties
Text properties structure.
void D4D_FillRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color)
Function draw filled rectangle on the screen.
void D4D_CnslEnsureVisible(D4D_OBJECT_PTR pObj)
The function update automatically the scroll bars to ensure visible position of cursor.
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.
#define D4D_CNSL_CURSOR_BLINK_TICK_COUNTER
This is definition of console cursor blink time (in ticks of eGUI time ticks - D4D_TimeTickPut). If not defined, it sets to ( 1 ) as a default.
D4D object messages structure.
#define D4D_CNSL_CURSOR_HEIGHT
This is definition of console cursor height . If not defined, it sets to ( 1 ) as a default...
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
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.
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.
#define D4D_DrawTextRect(ppt, psz, buffText, colorText, colorBkgd)
Function that draw text into defined rectangle on the screen.
D4D_FONT fontId
index of used font
void D4D_CnslSetScrollBarPosition(D4D_OBJECT_PTR pObj, D4D_INDEX hor, D4D_INDEX ver)
The function move the scroll bars on to new position if it's applicable.
#define D4D_CNSL_FLAGS_CHECKLINE
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.
void D4D_CnslGoToXY(D4D_OBJECT_PTR pObj, D4D_POINT newPosition)
The function move cursor on new position if possible.
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...
D4D_OBJECT_FLAGS flags
runtime object flags
The string properties type. This structure contains as Font as Text properties.
void D4D_ConsoleOnMessage(D4D_MESSAGE *pMsg)
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
void D4D_CnslClearLine(D4D_OBJECT_PTR pObj, D4D_INDEX line)
The function clear one line in console.
D4D_COOR D4D_GetTextBuffWidthTab(D4D_STRING *text_buffer, D4D_TAB *pTab)
The function returns width of text in pixels, also with tab table.
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)
D4D_POINT D4D_CnslGetCursor(D4D_OBJECT_PTR pObj)
The function returns the cursor position.
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.
#define D4D_CNSL_SCRLBR_STEP_H
This is definition of console horizontal scroll bar step (in characters). If not defined, it sets to ( 8 ) as a default.
#define D4D_CNSL_SCRLBR_WIDTH
This is definition of console scroll bars height . If not defined, it sets to ( 20 ) as a default...
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
void D4D_ShowObject(D4D_OBJECT_PTR pObject, D4D_BOOL bShow)
Function control visibility of object on screen.
D4D_FONT_DESCRIPTOR * pFontDescriptor
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.
#define D4D_FONT_FLAGS_FNT_WIDTH_PROPORTIONAL
#define D4D_GET_LIST_BOX_SCROLL_BAR_HOR(pObj)
D4D_TCHAR * pText
pointer to text array
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
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.
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.
#define D4D_GET_LIST_BOX_SCROLL_BAR_VER(pObj)
void D4D_CnslClearAll(D4D_OBJECT_PTR pObj)
The function clear whole console data.
#define D4D_CNSL_FLAGS_REDRAWLINE
#define D4D_GET_CONSOLE(pObj)
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 D4D_INDEX D4D_CnslFindMaxTextLenght(D4D_TCHAR *pText, D4D_FONT font, D4D_INDEX startOffset, D4D_INDEX maxLenght)
#define D4D_OBJECT_F_VISIBLE
Object after initialization is visible on the screen.
D4D_POINT D4D_CnslGetScrollBarPosition(D4D_OBJECT_PTR pObj)
The function returns the scroll bars position.
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.
static void D4D_CnslNewLine(D4D_OBJECT_PTR pObj, D4D_BOOL returnCarrier)
Type definition of eGUI size structure.
const D4D_OBJECT_SYS_FUNCTION d4d_consoleSysFunc
D4D_BOOL D4D_CnslPutString(D4D_OBJECT_PTR pObj, D4D_TCHAR *pText)
The function puts string on cursor position and updates cursor.
D4D_FONT_SIZE D4D_GetFontWidth(D4D_FONT ix)
static void D4D_ConsoleOnDraw(D4D_MESSAGE *pMsg)
sLWord D4D_INDEX_DELTA
Type definition of eGUI general index variables for signed offsets.
D4D_FONT_SIZE D4D_GetCharWidth(D4D_FONT ix, D4D_TCHAR ch)
Kill Capture message - is send when the object is losing capture keys status.
#define D4D_GET_CONSOLE_DATA(pObj)
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
const D4D_POINT d4d_point_zero
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.
static void D4D_CnslValue2Coor(D4D_OBJECT *pThis)
Type definition of eGUI geometry structure.
Set Capture message - is send when the object is getting capture keys status.
static D4D_BOOL D4D_CnslPutCharInt(D4D_OBJECT_PTR pObj, D4D_TCHAR ch)
#define D4D_CNSL_FLAGS_CURSORSTATE
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
void D4D_CnslScrollBarsFeedBack(D4D_OBJECT *pThis, D4D_INDEX old_position, D4D_INDEX new_position)
Byte D4D_KEY_SCANCODE
Type definition of eGUI keys scan code.
#define D4D_CNSL_FLAGS_REDRAWCURSOR
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.
D4D_BOOL D4D_CnslPutChar(D4D_OBJECT_PTR pObj, D4D_TCHAR ch)
The function puts one char on cursor position and updates cursor.
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
D4D_FONT_PROPERTIES font_properties
Font properties structure.
static void D4D_CnslOnInit(D4D_MESSAGE *pMsg)
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).
#define D4D_CNSL_SCRLBR_STEP_V
This is definition of console vertical scroll bar step (in lines on text). If not defined...
D4D_COOR x
Coordination in axis X.
Kill Focus message - is send when the object is losing focus.
#define D4D_CNSL_FLAGS_REDRAWALL
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.