From: poy <po...@12...> - 2007-11-27 16:06:50
|
ok, as i thought. so here is the same patch, with the tab control that can only be used with WidgetChildWindow. poy ----- Original Message ----- From: "Jacek Sieka" <arn...@gm...> To: "poy" <po...@12...>; "Patches & development discussion" <dcp...@li...> Sent: Monday, November 26, 2007 10:30 PM Subject: Re: [dcplusplus-devel] patch: update the main window title > 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 > > |