Page 1 of 1

Gadget Parents & Children

Posted: Mon Oct 01, 2012 12:55 pm
by Shield
Hey

I request functions to be implemented in PureBasic which allow us to determine the gadget's parent and all of
its children (if it is a container). I'm very well aware of the WinAPI possibilities to do this, but that's not the point.
Having these functions natively would allow doing more generic things with gadgets without keeping track of
them all, using a list or something similar.

Code: Select all

SetGadgetParent(id.i, parent.i)  ; Changes the parent of the gadget.
GetGadgetType(id.i)              ; Either a window, a container or a gadget.
GetGadgetParent(id.i)            ; Parent gadget of the specified gadget.
GetGadgetWindow(id.i)            ; ID of the window that contains the gadget.
ExamineGadgetChildren(id.i)      ; Examine all children of the specified container.
NextGadgetChild(id.i)         ; Move to the next children of the gadget.
FinishGadgetChild(id.i)       ; Finish the examination.
ExamineGadgets(id.i)             ; Examine all gadgets of a window.
NextGadget(id.i)                 ; Next gadget in the list.
FinishGadget(id.i)               ; Finishes the enumeration.
What do you guys think?


*removed typo*

Re: Gadget Parents & Children

Posted: Mon Oct 01, 2012 5:13 pm
by Polo
I'd like that very much!

Re: Gadget Parents & Children

Posted: Tue Jan 12, 2016 12:42 pm
by Ramses800
+1

Re: Gadget Parents & Children

Posted: Wed Jan 13, 2016 6:20 am
by Danilo
Of course +1, but AFAIK mestnyi requested it already (many times?).
Would make toolwindow/container docking much easier - a functionality that is currently missing.

Re: Gadget Parents & Children

Posted: Wed Jan 13, 2016 1:40 pm
by Shield
I'd of course still welcome this getting implemented, even though I made the request in 2012. :)
And I'm sure someone requested it before; I didn't find a similar request though back then.

Re: Gadget Parents & Children

Posted: Wed Jan 13, 2016 8:33 pm
by Danilo
Shield wrote:even though I made the request in 2012. :)
Sorry, thought it's a new topic, looking at the date of Ramses800's post.

Re: Gadget Parents & Children

Posted: Thu Jan 21, 2016 8:22 pm
by Ramses800
Old topic yes, but still something I would like!