Gadget Parents & Children

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Gadget Parents & Children

Post 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*
Last edited by Shield on Wed Jul 24, 2013 9:53 am, edited 1 time in total.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Gadget Parents & Children

Post by Polo »

I'd like that very much!
Ramses800
User
User
Posts: 27
Joined: Wed Nov 05, 2014 3:12 pm
Location: Sweden

Re: Gadget Parents & Children

Post by Ramses800 »

+1
Former VB6 developer adventuring in a brave, new Purebasic world!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Gadget Parents & Children

Post 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.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Gadget Parents & Children

Post 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.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Gadget Parents & Children

Post 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.
Ramses800
User
User
Posts: 27
Joined: Wed Nov 05, 2014 3:12 pm
Location: Sweden

Re: Gadget Parents & Children

Post by Ramses800 »

Old topic yes, but still something I would like!
Former VB6 developer adventuring in a brave, new Purebasic world!
Post Reply