Hi,
I'm currently trying to subclass Widgets from the TaharezLook and put then in second dll that is added as a second WindowSet to my GUIScheme, so I can use the derived widgets together with normal TL-Widgets.
Now when I subclass widgets from TL, I have to include for example TLButton.h (and link to TaharezLook(_d).lib).
Problem is now that there is already a registerFactory in the TL-Library.
I must admit that I can't see a solution to it. Has anybody successfully managed to subclass TL-Widgets (or WindowsLook-Widgets at that)? Maybe I missed something obvious.
Of course I could just edit the TL-source directly, but then I would always have to work with a patched version of the sourcecode and repatch for every update. Also, I think the dll-system should provide exactly this.
Thanks for any pointers,
Rincewind
Subclassing TaharezLook widgets
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Subclassing TaharezLook widgets
If I were to move the declaration of the registerFactory function into it's own header, which does not get included in any of the TL headers, I think that would solve the issue.
Let me know and I'll do that by the end of the week.
CE.
Let me know and I'll do that by the end of the week.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Subclassing TaharezLook widgets
I'm not quite sure if that would solve the problem, as when the linker tries to resolve the symbol registerFactory, it will still see the one in TaharezLook.lib and the one I put in one of my cpp files.
So I guess the only way would be to have one TaharezLook lib (and dll) that provides all the widgets and another one that only has the entry point (and loads the real dll automatically since it's linked to it's lib).
I know that this would involve quite some rearranging of the project files, etc. So if you think it's not worth the hassle, I can understand.
Maybe someone with some more knowledge about C++ linking, etc can see a simpler solution.
Greetings,
Rincewind
So I guess the only way would be to have one TaharezLook lib (and dll) that provides all the widgets and another one that only has the entry point (and loads the real dll automatically since it's linked to it's lib).
I know that this would involve quite some rearranging of the project files, etc. So if you think it's not worth the hassle, I can understand.
Maybe someone with some more knowledge about C++ linking, etc can see a simpler solution.
Greetings,
Rincewind
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Subclassing TaharezLook widgets
Yeah, I never considered the lib/linking issues, lol. Btw, that's just plain ordinary C linkage there, not C++.
I think that while the the two dlls approach would resolve the conflict, it would also overcomplicate things for more 'normal' uses.
The fact, really, is that the current look modules were not designed to have classes inherit from them, although I did not really want to give that as an answer
It should also be noted that the current look modules will shortly be depreciated in favour of the "Falagard" widget set. Here, "shortly" means months rather tahn weeks though.
CE.
I think that while the the two dlls approach would resolve the conflict, it would also overcomplicate things for more 'normal' uses.
The fact, really, is that the current look modules were not designed to have classes inherit from them, although I did not really want to give that as an answer

It should also be noted that the current look modules will shortly be depreciated in favour of the "Falagard" widget set. Here, "shortly" means months rather tahn weeks though.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 11 guests