Tree controls

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Tree controls

Postby spannerman » Fri Oct 21, 2005 17:37

Lindquist, Im aware that a question like "when is that for" is a bad one to ask, but roughly, roughly speaking, how far off is 0.5 from release?

I ask because Im wondering whether it would be worth while waiting for it, instead of working on code that may soon become deprecated.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Tree controls

Postby lindquist » Fri Oct 21, 2005 18:43

hopefully it will be out before christmas

User avatar
madlion
Just popping in
Just popping in
Posts: 6
Joined: Wed Aug 10, 2005 07:59

Re: Tree controls

Postby madlion » Sat Oct 22, 2005 23:07

Hi,

i just want to give some feddback.

I successful using your tree control on linux. ^^
It's working nice so far.
But on think i am missing.
There are no events for opening and closing of a tree node/item, right?
That would be nice to have, so tree items can dynamically added when opening a branch.

User avatar
DrPain
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Mar 17, 2005 15:19

Re: Tree controls

Postby DrPain » Mon Oct 24, 2005 20:29

Thanks for the feedback, madlion and martignasse.

At this point I'm not sure of the official future for this control. But I am using it, so I will keep developing it.
If others are using it (it seems there are), I'll keep posting updates here.

Anway, I added a couple of events for you madlion:
EventBranchOpened and EventBranchClosed.

I added event handlers for these events to the sample app so you can see how they work.

Also, I created a new WindowEventArgs based class for passing the arguments. Now in your event handler, you'll get the exact TreeItem that caused the event. See the sample for an example.

CEGUI_TreeControl_2005-10-24.zip

As always, let me know if you find any bugs or enhancements you'd like.

User avatar
madlion
Just popping in
Just popping in
Posts: 6
Joined: Wed Aug 10, 2005 07:59

Re: Tree controls

Postby madlion » Tue Oct 25, 2005 15:10

DrPain wrote:
I'll keep posting updates here.

Yes please. ^^

DrPain wrote:
Anway, I added a couple of events for you madlion:
EventBranchOpened and EventBranchClosed.

Cool, thanks a lot.

I will do an update and test it. ^^

DrPain wrote:
As always, let me know if you find any bugs or enhancements you'd like.

Sure.

Regards MadLion

User avatar
madlion
Just popping in
Just popping in
Posts: 6
Joined: Wed Aug 10, 2005 07:59

Re: Tree controls

Postby madlion » Wed Oct 26, 2005 09:28

Hi,

i haven't integrate the new version jet, but here are some screenshots of may use of it.

Runnig on linux.

http://www.fishheadsoftware.de/screenshot01.png
http://www.fishheadsoftware.de/screenshot02.png

Regards MadLion

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Tree controls

Postby spannerman » Tue Nov 15, 2005 16:10

Hey guys, do you know if the files in DrPain's latest zip file are compatible with the latest code of CEGUI? In other words, will this control work with CVS HEAD?

Ive given up on trying to create my own tree control...its just silly when theres a perfectly good working one out there already :hammer:

User avatar
DrPain
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Mar 17, 2005 15:19

Re: Tree controls

Postby DrPain » Tue Nov 15, 2005 16:59

I updated to CVS just before submitting the first version, so it should be up to date.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Tree controls

Postby spannerman » Tue Nov 15, 2005 21:50

Ok, Ive just unzipped the last zip over my latest CVS CEGUI folder structre and rebuilt it all, but unfortunately it errors during the linking phase. Is there anything else I might need to do?

Code: Select all

------ Rebuild All started: Project: Sample_TreeDemo, Configuration: Release Win32 ------

Deleting intermediate files and output files for project 'Sample_TreeDemo', configuration 'Release|Win32'.
Compiling...
Sample_TreeDemo.cpp
Linking...
Sample_TreeDemo.obj : error LNK2001: unresolved external symbol
"public: virtual bool __thiscall CEGUI::TreeItem::operator>(class CEGUI::TreeItem const &)const
" (??OTreeItem@CEGUI@@UBE_NABV01@@Z)
Sample_TreeDemo.obj : error LNK2001: unresolved external symbol
"public: virtual bool __thiscall CEGUI::TreeItem::operator<(class CEGUI::TreeItem const &)const " (??MTreeItem@CEGUI@@UBE_NABV01@@Z)
Sample_TreeDemo.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall CEGUI::TreeItem::draw(class CEGUI::Vector3 const &,float,class CEGUI::Rect const &)const
" (?draw@TreeItem@CEGUI@@UBEXABVVector3@2@MABVRect@2@@Z)
Sample_TreeDemo.obj : error LNK2001: unresolved external symbol
"public: virtual void __thiscall CEGUI::TreeItem::draw(class CEGUI::RenderCache &,class CEGUI::Rect const &,float,float,class CEGUI::Rect const *)const
" (?draw@TreeItem@CEGUI@@UBEXAAVRenderCache@2@ABVRect@2@MMPBV42@@Z)
Sample_TreeDemo.obj : error LNK2001: unresolved external symbol
"public: virtual class CEGUI::Size __thiscall CEGUI::TreeItem::getPixelSize(void)const
" (?getPixelSize@TreeItem@CEGUI@@UBE?AVSize@2@XZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __thiscall CEGUI::TreeItem::addItem(class CEGUI::TreeItem *)
" (__imp_?addItem@TreeItem@CEGUI@@QAEXPAV12@@Z) referenced in function "public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __thiscall CEGUI::Tree::addItem(class CEGUI::TreeItem *)
" (__imp_?addItem@Tree@CEGUI@@QAEXPAVTreeItem@2@@Z) referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __thiscall CEGUI::TreeItem::setSelectionBrushImage(class CEGUI::String const &,class CEGUI::String const &)
" (__imp_?setSelectionBrushImage@TreeItem@CEGUI@@QAEXABVString@2@0@Z) referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall CEGUI::TreeItem::TreeItem(class CEGUI::String const &,unsigned int,void *,bool,bool)
" (__imp_??0TreeItem@CEGUI@@QAE@ABVString@1@IPAX_N2@Z) referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static class CEGUI::String const CEGUI::Tree::EventBranchClosed
" (__imp_?EventBranchClosed@Tree@CEGUI@@2VString@2@B) referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static class CEGUI::String const CEGUI::Tree::EventBranchOpened
" (__imp_?EventBranchOpened@Tree@CEGUI@@2VString@2@B) referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static class CEGUI::String const CEGUI::Tree::EventSelectionChanged
" (__imp_?EventSelectionChanged@Tree@CEGUI@@2VString@2@B) referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function
"public: virtual bool __thiscall TreeDemoSample::initialiseSample(void)
" (?initialiseSample@TreeDemoSample@@UAE_NXZ)
Sample_TreeDemo.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall CEGUI::TreeItem::~TreeItem(void)
" (__imp_??1TreeItem@CEGUI@@UAE@XZ) referenced in function
"public: virtual void * __thiscall CEGUI::TreeItem::`scalar deleting destructor'(unsigned int)
" (??_GTreeItem@CEGUI@@UAEPAXI@Z)
..\..\..\..\Samples\bin/Sample_TreeDemo.exe : fatal error LNK1120: 14 unresolved externals

Build log was saved at "file://c:\Ogre_engine\cegui_mk2\makefiles\win32\Vc++7.1\Samples\Output\Release\BuildLog.htm"
Sample_TreeDemo - 15 error(s), 0 warning(s)


User avatar
DrPain
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Mar 17, 2005 15:19

Re: Tree controls

Postby DrPain » Wed Nov 16, 2005 01:09

Did you rebuild the library before building the sample app?
It looks like the tree control isn't linked into your CEGUI lib.

You're also missing timeGetTime() from the sample.
Are you on a Windows machine, or other OS? I wouldn't think it would be included in a non-Windows compile. I have a #define around it. However, winmm.lib should be set as an input lib in the project file for Windows.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Tree controls

Postby spannerman » Wed Nov 16, 2005 09:38

DrPain wrote:
Did you rebuild the library before building the sample app?


I did a Rebuild All after getting the latest CEGUI code from CVS last night, all the projects built fine except for the tree demo.

DrPain wrote:
You're also missing timeGetTime() from the sample.


How can you tell? What significance does this have, am I somehow using the wrong tree files?

DrPain wrote:
Are you on a Windows machine, or other OS?


Windows, using VC 7.1

DrPain wrote:
I wouldn't think it would be included in a non-Windows compile. I have a #define around it. However, winmm.lib should be set as an input lib in the project file for Windows.


Looking in the project settings for the tree demo, Winmm.lib is set as an additional dependency, but none of the other CEGUI samples have this. Whats this library for, and why does the tree demo need it but not the others?

User avatar
DrPain
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Mar 17, 2005 15:19

Re: Tree controls

Postby DrPain » Wed Nov 16, 2005 13:24

spannerman wrote:
How can you tell? What significance does this have, am I somehow using the wrong tree files?

I can tell because it's listed as an unresolved external. I can't see how you could be using the wrong files.
Is CEGUITreeItem.cpp listed in the project files under CEGUIBase/Source Files/elements?

Looking in the project settings for the tree demo, Winmm.lib is set as an additional dependency, but none of the other CEGUI samples have this. Whats this library for, and why does the tree demo need it but not the others?

I only use timeGetTime() to seed the rand function, which I used to randomize the tree layout at runtime. It could be taken out with no ill effect, I just like to do things properly (seeding rand before using it, that is).

If you comment out the following line from TreeDemoSample::initialiseSample(), that unresolved external should go away:
srand(timeGetTime());

If it is indeed listed as a dependency, it should be linked in. Very strange.

Do you get these same errors when building the Debug version?

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Tree controls

Postby spannerman » Wed Nov 16, 2005 20:01

Yaay, its all working now :D

DrPain wrote:
Is CEGUITreeItem.cpp listed in the project files under CEGUIBase/Source Files/elements?


No, it certainly wasnt...none of the files were, including those in WidgetSets\Falagard. I really should have checked for this (doh!! :hammer: ) but hey, the tree demo project was there in the solution so I just wrongly presumed it all was.

Following adding them in, I then got a timeGetTime error, so...

If you comment out the following line from TreeDemoSample::initialiseSample(), that unresolved external should go away:
srand(timeGetTime());


I commented that line out, and it compiled fine.
The final catch was renaming the TreeDemo.layout to TreeDemoVanilla.layout, and then it was all up and running.

Thanks for your help Dr Pain, and for this widget. Very cool indeed ;)

User avatar
DrPain
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Mar 17, 2005 15:19

Re: Tree controls

Postby DrPain » Wed Nov 16, 2005 20:15

Doh! I just realised what happened.
I had included CEGUI.sln and Sample_TreeDemo.vcproj, but I forgot to include the new version of BaseSystem.vcproj, which would have all the base items. :oops:
I just zipped it up and posted it here (in case anyone else needs it): BaseSystem_2005-10-24.zip
Unzip this file to the directory cegui_mk2\makefiles\win32\VC++7.1\BaseSystem
Sorry for the trouble!

spannerman wrote:
Yaay, its all working now :D
.
.
.
Thanks for your help Dr Pain, and for this widget. Very cool indeed ;)

You're very welcome. I hope you get good use out of it.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Re: Tree controls

Postby spannerman » Mon Nov 21, 2005 22:44

Hey Crazy Eddie and the dev guys, will this tree control widget be making it into CVS by any chance?


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests