Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XLISTBOX_MAX_STR on List items (signature gslc_ElemXListboxGetItem) #434

Open
dirkx opened this issue Feb 4, 2022 · 0 comments
Open

XLISTBOX_MAX_STR on List items (signature gslc_ElemXListboxGetItem) #434

dirkx opened this issue Feb 4, 2022 · 0 comments

Comments

@dirkx
Copy link
Contributor

dirkx commented Feb 4, 2022

Feature Request or Enhancement

We currently have a fairly short XLISTBOX_MAX_STR (20 chars) used (only) within gslc_ElemXListboxDraw of the text string of the label gotten via gslc_ElemXListboxGetItem() that is often a lot smaller than the natural width of the list box (around 48 chars).

It may be an option to change the signature of gslc_ElemXListboxGetItem - to have it pass a pointer rather than copy the content of the string into a new buffer. So that gslc_ElemXListboxDraw() does not have to declare a XLISTBOX_MAX_STR buffer. (And the generated code to declare a char acTxt;[MAX_STR + 1]).

bool gslc_ElemXListboxGetItem(gslc_tsGui* pGui, gslc_tsElemRef* pElemRef, int16_t nItemCurSel, char**pStrItemPtr

Or alternatively - retire it and rely on gslc_ElemXListboxGetItemAddr or something similar instead.

dirkx added a commit to dirkx/GUIslice that referenced this issue Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant