add MwTreeViewGetOpened
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
b38c146ddf
commit
56544212b1
4 changed files with 32 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue