lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re[2]: [lmi] Generating screenshots automatically


From: Vaclav Slavik
Subject: Re: Re[2]: [lmi] Generating screenshots automatically
Date: Tue, 17 Feb 2009 17:22:51 +0100

On Tue, 2009-02-17 at 02:10 +0100, Vadim Zeitlin wrote:
> GC> Iterating over all panels automatically is pretty important.
> 
>  Ok, I'll add it, thanks. Vaclav, is there a way to find all top-level
> objects defined in an XRC file or will I need to parse XML to do this? (VQ1)

There isn't (it's again the same reasoning: it's not particularly useful
for *resources loader*, which is what wxXmlResource class is). It
wouldn't be hard to add and it's not completely off-topic for
wxXmlResource -- although I'm not _sure_ it's appropriate to have it
there.

More importantly, are all the panels we need to show *top-level*
objects? In other words, don't we need to extract individual panels from
e.g. illustrations creation wxNotebook?

> GC> Drawing a circle around each number might make its footnote-nature more
> GC> apparent. I suppose that'd be nice if it's not too difficult to do.
> 
>  No, at least not on the image itself. I don't think it's possible to use
> rounded numbers in wxHTML easily though (by difficult way I mean that we
> could always create a bitmap for each of them and include it in the HTML
> using <img> tag). I'd be tempted to just use <ol> and <li> for this.
> Vaclav, does wxHTML support specifying a different colour for <li>? (VQ2)

No. wxHTML doesn't implement CSS and as far as I know, there's no way to
do that with HTML markup only. But... are the generated HTML files (if
we choose that approach) meant to be displayed by wxHTML at all? In
other words, would CSS-only styling be enough?

> GC> But wait: as an experiment, I modify 'skin.xrc' in this vein:
> GC>   <object class="wxListBox" name="ProductName">
> GC>       <help>Product</help>
> GC> +     <foo>xyzzy</foo>
> GC> and to my surprise it "works": the <foo> element seems to be ignored
> GC> silently. Is that a behavior we can rely upon?
> 
>  Yes. As XRC allows you to define your own custom controls the set of
> allowed tags in it is open. I was a bit surprised that the set of tags for
> the standard controls was open too but Vaclav confirms that this is
> intentional. 

Let me clarify this. What I said was that you should be allowed to
include arbitrary elements *from another XML namespace* inside <object>.
That is, <lmi:foo> should be allowed, but <foo> should not -- even
though we don't have a validator for the http://www.wxwidgets.org/wxxrc
namespace yet, we may have it in the future.

> GC> I guess that'd mean we'd have to parse the xml, but then again we'd
> GC> save the effort of rendering the text to png. What do you think?
> 
>  This would certainly work and Vaclav thinks that this is the best
> solution. I don't like it that much because currently XRC parses XML but
> simply throws away this information and I will need to reparse 

Correction: you'd only have to scan the already-parsed wxXmlNode tree,
which is much cheaper than (re)parsing XML.


Regards,
Vaclav





reply via email to

[Prev in Thread] Current Thread [Next in Thread]