Tree controls
Moderators: CEGUI MVP, CEGUI Team
Tree controls
I'm about to start working on a tree control, but wanted to verify that one doesn't already exist, or someone else isn't working on one.
My goal is to have each tree branch consist of two items: an image, and an edit box. It will look/act much like the tree in the Window Explorer left-pane.
Any comments or suggestions?
My goal is to have each tree branch consist of two items: an image, and an edit box. It will look/act much like the tree in the Window Explorer left-pane.
Any comments or suggestions?
- martignasse
- Just can't stay away
- Posts: 227
- Joined: Thu Apr 14, 2005 08:10
- Location: Lyon, FRANCE
Re: Tree controls
cool,
you'll making happy people
you'll making happy people
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: Tree controls
I have started working on a basic tree control, but dont have much to show right now. I wasnt planning for it to be a new CEGUI widget though - its too basic, only allow one leaf node per branch. I was going for something like what NFZ created for his resource editor.
Anyway, let us know how you get on - If your making a proper widget that will be added to the library then that would be great!
Anyway, let us know how you get on - If your making a proper widget that will be added to the library then that would be great!
Re: Tree controls
I intend on making a proper widget for the library, but of course there's no guarantees I'll be successful.
Re: Tree controls
Making good progress.
Obligatory screenshot:
Opening and closing the tree branches works great.
You can have as many levels as you like (barring out-of-memory conditions).
Any tree item can have an icon associated with it, or not.
The first tree item shown above (1a) and all its children have icons associated with them.
Tree items 1b and 1c do no have icons.
As I have it now, the icons are scaled to a square the size of the text height. Any comments regarding that?
Now to hook up all the necessary events, and do some more extensive testing.
Obligatory screenshot:
Opening and closing the tree branches works great.
You can have as many levels as you like (barring out-of-memory conditions).
Any tree item can have an icon associated with it, or not.
The first tree item shown above (1a) and all its children have icons associated with them.
Tree items 1b and 1c do no have icons.
As I have it now, the icons are scaled to a square the size of the text height. Any comments regarding that?
Now to hook up all the necessary events, and do some more extensive testing.
Last edited by DrPain on Tue May 09, 2006 12:24, edited 1 time in total.
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Tree controls
This looks very nice.
Could you tell a bit about your implementation ?
And is it 0.5 (CVS HEAD) compatible?
Could you tell a bit about your implementation ?
And is it 0.5 (CVS HEAD) compatible?
Re: Tree controls
I've started a wiki page to describe the Tree control: Tree control Wiki page
As for CVS compatiblity, I updated to CVS less than a month ago, so I'd say yes, it's probably compatible.
I'll re-update before submitting a patch to ensure it is.
Not too many comments so far, so either nobody needs a tree control, or what I've shown is acceptable to everyone.
So how should a patch be approached? Should I wait until all my desired features are done (drag and drop for one)? Or shall I submit the patch now and keep working on it?
As for CVS compatiblity, I updated to CVS less than a month ago, so I'd say yes, it's probably compatible.
I'll re-update before submitting a patch to ensure it is.
Not too many comments so far, so either nobody needs a tree control, or what I've shown is acceptable to everyone.
So how should a patch be approached? Should I wait until all my desired features are done (drag and drop for one)? Or shall I submit the patch now and keep working on it?
Re: Tree controls
DrPain wrote:
Not too many comments so far, so either nobody needs a tree control, or what I've shown is acceptable to everyone.
No comments because as you said what you show ist acceptable.
I think more comments will come if we can test it your self.
DrPain wrote:
So how should a patch be approached? Should I wait until all my desired features are done (drag and drop for one)? Or shall I submit the patch now and keep working on it?
I would prefer if you submit the patch and keep working on it. So other can test and make suggestions.
Good work! ^^
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: Tree controls
Wow, that is looking great man!
First time Ive seen it since my last post here, and I must say Im impressed...from reading the wiki page you created its a lot more powerful than I was planning. Excellant stuff
Exactly how I was doing it, I think that is fine. If people want more functionality they can submit a patch.
Thanks for releasing this widget DrPain, big respect
Not too many comments so far, so either nobody needs a tree control, or what I've shown is acceptable to everyone.
First time Ive seen it since my last post here, and I must say Im impressed...from reading the wiki page you created its a lot more powerful than I was planning. Excellant stuff
As I have it now, the icons are scaled to a square the size of the text height. Any comments regarding that?
Exactly how I was doing it, I think that is fine. If people want more functionality they can submit a patch.
Thanks for releasing this widget DrPain, big respect
Re: Tree controls
I think the tree control is fairly stable at this point, so I'll post a beta.
Tree Control Beta 10/20/2005
Unzip the file directly over your cegui_mk2 directory (put the ZIP file in the directory ABOVE cegui_mk2 and "unzip here" ). All the paths are saved, starting at cegui_mk2.
I've changed a few things to enable/enhance the use of the tree control:
1) Vanilla.imageset, vanilla.tga, Vanilla.looknfeel and VanillaSkin.scheme have been expanded to include sizing mouse cursors, +/- buttons for the tree, and tooltips.
2) CEGuiD3D9BaseApplication.h and CEGuiD3D9BaseApplication.cpp have been changed slightly to call injectTimePulse to enable tooltips in the samples.
3) CEGUI.sln now has the Sample_TreeDemo project included in it.
So if you've made changes to any of these files, you'll want to back them up before expanding the ZIP file.
Oh, one known problem at the moment. I sync'ed to CVS yesterday, and now the images for the scrollbars are missing. Even in the FalagardDemo1 sample. Anyone aware if that's a known issue?
I'm still actively working on this control, so if you have any requests/comments, now's the time to make them.
Feedback wanted!
Tree Control Beta 10/20/2005
Unzip the file directly over your cegui_mk2 directory (put the ZIP file in the directory ABOVE cegui_mk2 and "unzip here" ). All the paths are saved, starting at cegui_mk2.
I've changed a few things to enable/enhance the use of the tree control:
1) Vanilla.imageset, vanilla.tga, Vanilla.looknfeel and VanillaSkin.scheme have been expanded to include sizing mouse cursors, +/- buttons for the tree, and tooltips.
2) CEGuiD3D9BaseApplication.h and CEGuiD3D9BaseApplication.cpp have been changed slightly to call injectTimePulse to enable tooltips in the samples.
3) CEGUI.sln now has the Sample_TreeDemo project included in it.
So if you've made changes to any of these files, you'll want to back them up before expanding the ZIP file.
Oh, one known problem at the moment. I sync'ed to CVS yesterday, and now the images for the scrollbars are missing. Even in the FalagardDemo1 sample. Anyone aware if that's a known issue?
I'm still actively working on this control, so if you have any requests/comments, now's the time to make them.
Feedback wanted!
- martignasse
- Just can't stay away
- Posts: 227
- Joined: Thu Apr 14, 2005 08:10
- Location: Lyon, FRANCE
Re: Tree controls
hi,
Not tested yet but already can say you've made good job.
and good idea to make the wiki page in the same time.
keep up good work
PS
just an "artist point of view" from the screenshot :
the +/- icon look to be not excactly aligned/centered with the icon above
[img align=left]http://mfleurent.free.fr/CEGUI/icon.jpg[/img]
it's just to have something to say
Not tested yet but already can say you've made good job.
and good idea to make the wiki page in the same time.
keep up good work
PS
just an "artist point of view" from the screenshot :
the +/- icon look to be not excactly aligned/centered with the icon above
[img align=left]http://mfleurent.free.fr/CEGUI/icon.jpg[/img]
it's just to have something to say
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: Tree controls
Aaah cool...Id love to try it out right now, but I will first need to update to latest cegui cvs, unzip and recompile it all, so its not gonna happen tonight. Will let you know tomorrow though!
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Tree controls
Hi again.
The work you've done is nice, I had a look over the source...
The "plan" for the future of CEGUI is along a somewhat different path though.
Currently I'm working on a "prototype" of a new listbox widget that is not implemented using "items". Instead it uses plain windows for content. These are inherited from ItemEntry which provides the interface to allow automatic layout.
The idea is that it should be possible to specify list content through XML layouts without having to modify the XML parser every time a new type of item is introduced, furthermore it allows for customization of the items via Falagard, which makes it possible to greatly personalize the items without any C++ code.
Currently the idea is to rewrite the list widgets to use this approach, and make the old ones deprecated. Its not likely they will exist in 1.0.
The widget you have written is a GREAT extension to the 0.4 widgetset and goes a long way in completing whats available.
But inclusion in 0.5 ? I'm not sure...
This is based on my conversations with CE on IRC. So I feel fairly confident that he feels the same way!
The work you've done is nice, I had a look over the source...
The "plan" for the future of CEGUI is along a somewhat different path though.
Currently I'm working on a "prototype" of a new listbox widget that is not implemented using "items". Instead it uses plain windows for content. These are inherited from ItemEntry which provides the interface to allow automatic layout.
The idea is that it should be possible to specify list content through XML layouts without having to modify the XML parser every time a new type of item is introduced, furthermore it allows for customization of the items via Falagard, which makes it possible to greatly personalize the items without any C++ code.
Currently the idea is to rewrite the list widgets to use this approach, and make the old ones deprecated. Its not likely they will exist in 1.0.
The widget you have written is a GREAT extension to the 0.4 widgetset and goes a long way in completing whats available.
But inclusion in 0.5 ? I'm not sure...
This is based on my conversations with CE on IRC. So I feel fairly confident that he feels the same way!
Re: Tree controls
Good lord.
Why didn't you say something a week ago when I started this?
Why didn't you say something a week ago when I started this?
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Tree controls
yes.. I know. And I should have.
It was the reason for asking about your implementation...
I hope it won't discourage you completely from continuing the good work. It's very nice to see new widgets being developed, which does'nt happen too often.
Maybe you could be talked into creating the "++" version ?
And btw. There has been a little talk about doing a 0.4.1 release. Personally I think this would be a great addition to that. This could make way to include it in 0.5 as well - even though marked deprecated.
It was the reason for asking about your implementation...
I hope it won't discourage you completely from continuing the good work. It's very nice to see new widgets being developed, which does'nt happen too often.
Maybe you could be talked into creating the "++" version ?
And btw. There has been a little talk about doing a 0.4.1 release. Personally I think this would be a great addition to that. This could make way to include it in 0.5 as well - even though marked deprecated.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 2 guests