add MwTreeViewGetOpened
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-05-12 09:49:06 +09:00
commit 56544212b1
4 changed files with 32 additions and 9 deletions

View file

@ -96,7 +96,7 @@ static void draw(MwWidget handle) {
MwDrawFrame(handle, &r3, c, 1);
MwLLClip(handle->lowlevel, NULL);
}else if(n == 1 && i == 0){
} else if(n == 1 && i == 0) {
MwRect r3 = r2;
r3.y = tab_height(handle);

View file

@ -435,6 +435,12 @@ static void mwTreeViewSetOpenedImpl(MwWidget handle, void* item, int opened) {
}
}
static int mwTreeViewGetOpenedImpl(MwWidget handle, void* item) {
MwTreeViewEntry* e = item;
return e->opened;
}
static void func_handler(MwWidget handle, const char* name, void* out, va_list va) {
if(strcmp(name, "mwTreeViewAdd") == 0) {
void* parent = va_arg(va, void*);
@ -468,6 +474,10 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
int opened = va_arg(va, int);
mwTreeViewSetOpenedImpl(handle, item, opened);
}
if(strcmp(name, "mwTreeViewGetOpened") == 0) {
void* item = va_arg(va, void*);
*(int*)out = mwTreeViewGetOpenedImpl(handle, item);
}
}
static void tick(MwWidget handle) {