How to list all widgets within a widget?

Hi;
I am trying to disable all the buttons in a window when any one of the
button was clicked. Is there anyway I can do it?
I come out with a simple algorithm. Simply search through the base
widget and check if there is any button windows available, if yes, disable
it… However, the problem is can Photon support that?
I read through the PtWidget.h and i noticed that there are a few
elements in PtWidget_t structure that can be used to navigate for all
widgets within a given widget such as parent, child, brother and bro_behind
(hope i din interpret wrongly). However, how i can differentiate what type
of widget is the given pointer is pointing at??
Hope some one out there can help me clarify my doubts in this. Your
kindness is greatly appreciated. Thanks.

Regards;
Ying Leong

Hi.

I am trying to disable all the buttons in a window when any one of the
button was clicked. Is there anyway I can do it?
I come out with a simple algorithm. Simply search through the base
widget and check if there is any button windows available, if yes, disable
it… However, the problem is can Photon support that?
I read through the PtWidget.h and i noticed that there are a few
elements in PtWidget_t structure that can be used to navigate for all
widgets within a given widget such as parent, child, brother and bro_behind
(hope i din interpret wrongly). However, how i can differentiate what type
of widget is the given pointer is pointing at??
Hope some one out there can help me clarify my doubts in this. Your
kindness is greatly appreciated. Thanks.

For navigating the widgets, Photon provides some functions like
PtWidgetFamily(), PtWidgetTree() and PtWidgetTreeTraverse(). You can
test if a widget is a PtButton with PtWidgetIsClass()

if( PtWidgetIsClass( widget, PtButton ) ) …

The documentation for PtWidgetFamily has an example similar to what you
want to do.


Julian Kinraid