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
|
|
@ -90,6 +90,19 @@ MwInline void MwTreeViewSetOpened(MwWidget handle, void* item, int opened) {
|
|||
MwVaWidgetExecute(handle, "mwTreeViewSetOpened", NULL, item, opened);
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Gets the opened state of ithe item
|
||||
* @param handle Widget
|
||||
* @param item Item
|
||||
* @return Opened or not
|
||||
*/
|
||||
MwInline int MwTreeViewGetOpened(MwWidget handle, void* item) {
|
||||
int out;
|
||||
MwVaWidgetExecute(handle, "mwTreeViewGetOpened", (void*)&out, item);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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