81 } D4D_LIST_BOX_TMP_VAL;
83 #define _calc (*((D4D_LIST_BOX_TMP_VAL*)d4d_scratchPad))
126 if(sizey % fontHeight)
154 _calc.contentPos.x++;
155 _calc.contentPos.y++;
156 _calc.contentSize.cx -= 2;
157 _calc.contentSize.cy -= 2;
213 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
226 tmp_point =
_calc.contentPos;
227 tmp_size.
cx =
_calc.contentSize.cx;
261 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
268 tmp_point.
y +=
_calc.textOff;
288 if(pListBox->
pData->
ix >= tmpItemsCnt)
376 #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
408 if(tmp_y <
_calc.textOff)
411 if(pListBox->
pData->
ix != tmpB)
425 tmp_y -=
_calc.textOff;
580 for(i=0;i< i_max;i++)
687 #if defined(D4D_LLD_TCH) || defined(D4D_LLD_MOUSE)
707 D4D_ListBoxOnTouch(pMsg, &touchClickPoint);
722 D4D_ListBoxOnTouch(pMsg, &touchClickPoint);
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_LIST_BOX_ITEM * D4D_ListBoxGetItemList(D4D_OBJECT_PTR pThis)
Function gets the current using item list.
#define D4D_OBJECT_F_FOCUSRECT
Object has an outlined rectangle.
#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_COLOR D4D_ObjectGetForeColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current fore color.
static D4D_LIST_BOX_INDEX D4D_GetPositionCount(D4D_OBJECT *pThis)
void D4D_ListBoxChangeItemList(D4D_OBJECT_PTR pThis, const D4D_LIST_BOX_ITEM *pItems)
Function change the items list using by list box.
#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...
const D4D_MARGIN listBox_marginDefault
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.
D4D_INDEX printLen
Length of string that should be used (printed).
D4D_LIST_BOX_INDEX D4D_ListBoxGetItemCount(D4D_OBJECT_PTR pThis)
Function gets the count of list box items.
This is list box item variable type.
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.
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_TCHAR * pText
pointer to item text
D4D_COLOR D4D_ObjectGetForeFillColor(D4D_OBJECT *pObj)
Function return object current fill fore color.
D4D_OBJECT_INITFLAGS initFlags
The initializations object flags.
#define D4D_OBJECT_F_TABSTOP
Object can be focused.
#define D4D_DrawTextRect(ppt, psz, buffText, colorText, colorBkgd)
Function that draw text into defined rectangle on the screen.
#define D4D_LIST_BOX_SCRLBR_WIDTH
This is list box embedded scroll bar width If not defined, it sets to 20 pixels as a default...
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 void D4D_ListBoxValue2Coor(D4D_OBJECT *pThis)
const D4D_OBJECT_SYS_FUNCTION d4d_listBoxSysFunc
D4D_POINT D4D_GetTouchScreenCoordinates(D4D_OBJECT *pObject)
#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.
#define D4D_LIST_BOX_F_SIDEBAR
Force to used always side bar scroll bar.
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.
#define D4D_GetMouseCoordinates(pObject)
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
D4D_LIST_BOX_DATA * pData
#define D4D_SCRATCHPAD_SIZE
Call back function raised by any new input event (touch, mouse, keys).
D4D_LIST_BOX_INDEX D4D_ListBoxGetIndex(D4D_OBJECT *pThis)
Function returns the current selected item index.
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_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.
This is the main structure of the color scheme in the D4D. It contains all the necessary colors to ru...
D4D_TCHAR * D4D_ListBoxGetItemTextIx(D4D_OBJECT_PTR pThis, D4D_LIST_BOX_INDEX ix)
Function gets the text of item choosed by item index.
D4D_COOR cx
Size in axis X (width)
void D4D_ListBoxOnMessage(D4D_MESSAGE *pMsg)
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.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
#define D4D_GET_LIST_BOX(pObj)
D4D_COOR bottom
Margin of bottom side.
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
D4D_LIST_BOX_INDEX D4D_ListBoxFindUserDataItem(D4D_OBJECT_PTR pThis, void *pUser)
Function finds the index of items with specified user data.
#define D4D_LIST_BOX_ITEM_TXT_PRTY_DEFAULT
This is list box init text properties. If not defined, it sets to (D4D_ALIGN_H_LEFT_MASK | D4D_ALIGN_...
void D4D_ShowObject(D4D_OBJECT_PTR pObject, D4D_BOOL bShow)
Function control visibility of object on screen.
D4D_COOR right
Margin of right side.
void D4D_ListBoxScrollBarsFeedBack(D4D_OBJECT *pThis, D4D_INDEX old_position, D4D_INDEX new_position)
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
D4D_INDEX D4D_GetTextLength(D4D_TCHAR *pText)
The function returns lenght of text.
void D4D_ListBoxSetIndex(D4D_OBJECT *pThis, D4D_LIST_BOX_INDEX ix)
Function select new item by index.
#define NULL
Type definition of null pointer.
sByte D4D_LIST_BOX_INDEX
This is list box item index variable type.
D4D_OBJECT_USR_DATA userData
The pointer on user data container (user pointer and optionaly parent/children).
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
D4D_STR_PROPERTIES * str_properties
pointer to string properties
D4D_COOR y
Coordination in axis Y.
D4D_COLOR bckgFocus
The object background color in focused state.
#define D4D_OBJECT_F_NOTINIT
#define D4D_LIST_BOX_SCRLBR_STEP
This is list box embedded scroll bar change step If not defined, it sets to 1 step as a default...
D4D_OBJECT_PTR D4D_GetFocusedObject(const D4D_SCREEN *pScreen)
The function returns pointer to object that is focused in given screen.
D4D_MSGID nMsgId
Type of message.
D4D_SIZE size
Size of the object.
void D4D_ListBoxEnsureVisible(D4D_OBJECT *pThis)
Function ensure that the selected item in list will be scrolled to visible area.
D4D_KEY_SCANCODE key
There will be stored only code of key without release / press information - is valid with D4D_MSG_KEY...
D4D_BOOL D4D_IsVisible(D4D_OBJECT *pObject)
Function find out if the object is visible or not.
#define D4D_GET_LIST_BOX_SCROLL_BAR(pObj)
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.
#define D4D_BEVEL_WIDTH
D4D_BEVEL_WIDTH constant declaration - can't be changed!
Draw message - is send when the object should be redrawed.
static void D4D_ListBoxOnDraw(D4D_MESSAGE *pMsg)
D4D_TCHAR * D4D_ListBoxGetItemText(D4D_OBJECT_PTR pThis)
Function gets the selected item text.
#define D4D_LIST_BOX_ITEM_FNT_PRTY_DEFAULT
This is list box init font properties. If not defined, it sets to ( 0 ) as a default.
D4D_COOR cy
Size in axis Y (height)
The object system function needed for each object - this is part of D4D_OBJECT main structure...
D4D_OBJECT_RELATIONS pRelations
Relationship between the objects.
D4D_LIST_BOX_INDEX page_ix
#define D4D_OBJECT_F_VISIBLE
Object after initialization is visible on the screen.
#define D4D_OBJECT_F_FASTTOUCH
Object has enabled fast touch screen capability. This option supports only a some objects (button...
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.
D4D_LSTBX_ON_EVENT OnEvent
#define D4D_DrawTextRRect(ppt, psz, buffText, colorText, colorBkgd, radius)
Function that draw text into defined rectangle on the screen with corner radius.
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
D4D_LIST_BOX_INDEX posCnt
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.
void * D4D_ListBoxGetItemUserData(D4D_OBJECT_PTR pThis)
Function gets the selected item user data.
const D4D_LIST_BOX_ITEM * pItems
static void D4D_ListBoxFocusPreviousItem(D4D_OBJECT *pThis)
static void D4D_ListBoxFocusNextItem(D4D_OBJECT *pThis)
static void D4D_ListBoxOnInit(D4D_OBJECT *pThis)
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
D4D_MARGIN * pMargin
Object inner margin.
void * pUser
pointer to void (it can be retype to any other user data in size or less that is pointer size) ...
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_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...
static D4D_LIST_BOX_INDEX D4D_GetItemsCount(D4D_LIST_BOX *pListBox)
D4D_INDEX printOff
Offset of string that should be used (printed).
D4D_COLOR foreFocus
The object fore color in focused state.
D4D_COOR top
Margin of top side.
D4D_COOR x
Coordination in axis X.
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.
Type definition of eGUI client area margin structure.
static void D4D_ListBoxOnKeyUp(D4D_MESSAGE *pMsg)
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
#define D4D_LIST_BOX_CHILD_SCROLL_BAR_IX
D4D_OBJECT * D4D_GetCapturedObject(void)
Function returns the current keys capturing object pointer.