mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-21 08:34:11 +00:00
optimize
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@333 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user