add MwTreeViewSetOpened
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@779 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
e1b2f40ac8
commit
7d81e59c7d
3 changed files with 28 additions and 3 deletions
|
|
@ -410,7 +410,17 @@ static void mwTreeViewSetPixmapImpl(MwWidget handle, void* item, MwLLPixmap pixm
|
|||
|
||||
e->pixmap = pixmap;
|
||||
|
||||
if(e->parent != NULL && e->parent->opened) {
|
||||
if(e->parent == NULL || (e->parent != NULL && e->parent->opened)) {
|
||||
resize(handle);
|
||||
}
|
||||
}
|
||||
|
||||
static void mwTreeViewSetOpenedImpl(MwWidget handle, void* item, int opened) {
|
||||
MwTreeViewEntry* e = item;
|
||||
|
||||
e->opened = opened;
|
||||
|
||||
if(e->parent == NULL || (e->parent != NULL && e->parent->opened)) {
|
||||
resize(handle);
|
||||
}
|
||||
}
|
||||
|
|
@ -443,6 +453,11 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
|
|||
MwLLPixmap pixmap = va_arg(va, MwLLPixmap);
|
||||
mwTreeViewSetPixmapImpl(handle, item, pixmap);
|
||||
}
|
||||
if(strcmp(name, "mwTreeViewSetOpened") == 0) {
|
||||
void* item = va_arg(va, void*);
|
||||
int opened = va_arg(va, int);
|
||||
mwTreeViewSetOpenedImpl(handle, item, opened);
|
||||
}
|
||||
}
|
||||
|
||||
static void tick(MwWidget handle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue