Hey Pau,

this mail seems to have slipped off my radar. Anyway, I think I have
made something that could work for you, and committed it to CVS.

> It'd be nice if Ext::Dialog and Ext::Panel provided a
> setWindowTitleBar( WContainerWidget* w ) method. As
> Dialog::setWindowTitle (which is the same as Panel::setTitle) already
> renders whatever is in the WString it receives, it could be as simple
> as:
>
> Wt::Ext::Dialog::setWindowTitleBar( WContainerWidget *w ) {
>   setWindowTitle( w->code() ); // assuming a WContainerWidget::code()
> exists (it does not AFAIK), which outputs the XHTML + CSS code for
> that WContainerWidget
> }

So, we did have such a method (::code()) in our private API, with a
different name. I've renamed it, and documented it in the public API:

WWidget::htmlText(std::ostream& out);

(It may be useful in general for debugging, or just for the curious
and web savvy)

You then you indeed do things like this:

void Wizard::setTitle(WWidget& w)
{
  std::stringstream s;
  w.htmlText(s);
  Dialog::setWindowTitle(WString::fromUTF8(s.str()));
}

I didn't add these methods however to the API since I fear they could
be quite confusing?

> Or maybe I'm all wrong and I should be implementing WWizard from an
> Ext::Container, but subclassing Ext::Dialog makes everything easier :-)

You should always take the easiest route :-)

Regards,
koen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to