added some functions.

This commit is contained in:
Martin Preuss
2025-09-25 23:26:57 +02:00
parent ab41af104b
commit 7c721b9ff6
2 changed files with 46 additions and 0 deletions

View File

@@ -455,6 +455,49 @@ int AQDG_DrawableWidget_GetTextHeight(AQDG_OBJECT *object)
AQDG_OBJECT *AQDG_DrawableWidget_GetFirstVisibleChild(const AQDG_OBJECT *o)
{
if (o) {
AQDG_OBJECT *child;
child=AQDG_Object_Tree2_GetFirstChild(o);
while(child) {
if (child && !(AQDG_Object_GetFlags(child) & AQDG_OBJECT_FLAGS_HIDDEN))
return child;
child=AQDG_Object_Tree2_GetNext(child);
}
}
return NULL;
}
AQDG_OBJECT *AQDG_DrawableWidget_GetNextVisibleWidget(AQDG_OBJECT *o)
{
while(o) {
o=AQDG_Object_Tree2_GetNext(o);
if (o && !(AQDG_Object_GetFlags(o) & AQDG_OBJECT_FLAGS_HIDDEN))
return o;
}
return NULL;
}
void AQDG_DrawableWidget_UnhideAllChildren(AQDG_OBJECT *o)
{
AQDG_OBJECT *child;
child=AQDG_Object_Tree2_GetFirstChild(o);
while(child) {
AQDG_Object_SubFlags(child, AQDG_OBJECT_FLAGS_HIDDEN);
child=AQDG_Object_Tree2_GetNext(child);
}
}

View File

@@ -77,6 +77,9 @@ AQDG_API void AQDG_DrawableWidget_UpdateTextContentDims(AQDG_OBJECT *object);
AQDG_API int AQDG_DrawableWidget_GetTextWidth(AQDG_OBJECT *object);
AQDG_API int AQDG_DrawableWidget_GetTextHeight(AQDG_OBJECT *object);
AQDG_API AQDG_OBJECT *AQDG_DrawableWidget_GetFirstVisibleChild(const AQDG_OBJECT *o);
AQDG_API AQDG_OBJECT *AQDG_DrawableWidget_GetNextVisibleWidget(AQDG_OBJECT *o);
AQDG_API void AQDG_DrawableWidget_UnhideAllChildren(AQDG_OBJECT *o);
#endif