FLTK logo

Re: [fltk.general] Why doesn't FLTK provide access to a widget Tree?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Why doesn't FLTK provide access to a widget Tree? Ian MacArthur Jun 10, 2021  
 
On 10 Jun 2021, at 21:54, Webb Hinton 	wrote:
> 
> > I think your intuition about how fltk works may be missing the mark, that’s not really how it is done at all.
> 
> Understood, coming from a Web Dev environment, and given the various parent() and child() functions available to our FL::Group widgets, I assumed that behind the scenes some sort of tree structure was managing these relationships. If this is not how it works, then what kind of system FLTK use to keep track of parent/child relationships?

There’s no “master list” anywhere - widgets know who their current parent is and container widgets (groups, windows) know who their current immediate children are (but not their children’s children.) A widget can move from one parent to another pretty much at will.
That’s basically it. That’s about all you need.


-- 
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/A8907F54-2B47-4A37-845D-BFA7B26E13E0%40gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.