Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » PROPOSAL: TreeCtrl optionally owns Ctrl's in Node
Re: PROPOSAL: TreeCtrl optionally owns Ctrl's in Node [message #32530 is a reply to message #30754] Mon, 23 May 2011 22:57 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i will be warming up this thing, but need an advice in which direction to go:

the key problem in TreeCtrl is that Node is meant to be passed around by-value, i.e. performing DnD movings or using the Copy() function..

when a Node references a Ctrl which it owns, it cant be passed around by-value, it either needs to be picked (dtor would take care of destruciton of Ctrl) or a different Method for Moving/DnD of the Nodes needs to be found to avoid copy which would duplicate the Node and double ownership. so Node might need to stay unmouvable (exposed only as const or have a subclass which actually holds the ctrl..

any idea? i dont know what'd be better.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Changing tree control style
Next Topic: PROPOSAL : allow inserting and retrieving of classes DERIVED from TreeCtrl::Node
Goto Forum:
  


Current Time: Thu May 09 17:52:00 CEST 2024

Total time taken to generate the page: 0.01748 seconds