Subclassing TaharezLook widgets

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
rincewind
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06

Subclassing TaharezLook widgets

Postby rincewind » Tue Mar 08, 2005 21:23

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Subclassing TaharezLook widgets

Postby CrazyEddie » Wed Mar 09, 2005 10:47

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.

User avatar
rincewind
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06

Re: Subclassing TaharezLook widgets

Postby rincewind » Wed Mar 09, 2005 11:11

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Subclassing TaharezLook widgets

Postby CrazyEddie » Wed Mar 09, 2005 12:10

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.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 14 guests