From: Jacek S. <arn...@gm...> - 2007-11-26 21:30:42
|
Well, that cast is not safe (because someone could call addWidget with a window type different from WidgetWindow...a reasonable solution would be to make addWidget take a WidgetChildWindow pointer instead and then change TabInfo to keep that pointer around...removes the need for that template function in WidgetTabView even if it's slightly less flexible (since no other widget types may be added), but I think it's worth it - the tab view is meant to hold child windows... /J poy wrote: > update the main window title when the active child frame changes. > i added an event called onTitleChanged in WidgetTabView, not using any > dispatcher struct but simply with a callback function. > also, i'm not sure about that static_cast from Widget* to WidgetWindow*, > but it works fine here... > > poy |