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
PROPOSAL: TreeCtrl optionally owns Ctrl's in Node [message #30202] Wed, 15 December 2010 15:52 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi all

ArrayCtrl has got the possibility to own the Ctrls if they are passed as pointer, so one can create some on the fly and have the TreeCtrl take care of their destruction. this is great for editing the represented values.
it does not break the 'everything-belongs-somewhere-rule'. TreeCtrl is then the container..

since these two, ArrayCtrl and TreeCtrl are the major complex grouping Ctrl's they should support it and be of similar skills.

what do you think?

EDIT: at first i thought it is easy task, since TreeCtrl is already setup as to have Ctrls, but not owned. but i realize that TreeCtrl::Node and TreeCtrl::Item handling is not fitting in design as to handle ownership.

maybe someone could help here. attached is the so far changed TreeCtrl sources
  • Attachment: TreeCtrl.h
    (Size: 16.16KB, Downloaded 410 times)
  • Attachment: TreeCtrl.cpp
    (Size: 36.67KB, Downloaded 385 times)

[Updated on: Wed, 15 December 2010 21:31]

Report message to a moderator

 
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: Sat Apr 27 12:19:15 CEST 2024

Total time taken to generate the page: 0.07766 seconds