git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@333 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-14 18:48:06 +00:00
parent 5834771c75
commit c6c3a591f0
11 changed files with 73 additions and 0 deletions

View File

@@ -193,6 +193,27 @@ void MwListBoxInsert(MwWidget handle, int index, const char* text) {
}
}
void MwListBoxInsertMultiple(MwWidget handle, int index, char* const* text, int count) {
int i;
MwListBox lb = handle->internal;
int old;
if(index == -1) index = arrlen(lb->list);
old = index;
for(i = 0; i < count; i++) {
char* str = malloc(strlen(text[i]) + 1);
strcpy(str, text[i]);
arrins(lb->list, index, str);
index++;
}
resize(handle);
if(old < (MwGetInteger(lb->vscroll, MwNvalue) + MwGetInteger(lb->vscroll, MwNareaShown))) {
MwForceRender(lb->frame);
}
}
void MwListBoxDelete(MwWidget handle, int index) {
MwListBox lb = handle->internal;