On Fri, Dec 12, 2003 at 02:04:45PM +0100, Michael Schmitt spake thusly:
> 
> Andre Poenitz wrote:
> > On Fri, Dec 12, 2003 at 12:48:32PM +0100, Michael Schmitt wrote:
> > 
> >>BTW: Why does insetert need metrics(...) & draw(...)? If they are really 
> >>needed, then we have to fix insetcollapsable instead.
> > 
> > 
> > They change the font to 'red typewriter', don't they?
> 
> 
> So, this is the code to change the font to 'red typewriter'? Oh my God!
> 
> 
> void InsetERT::metrics(MetricsInfo & mi, Dimension & dim) const
> {
>          LyXFont tmpfont = mi.base.font;
>          getDrawFont(mi.base.font);
>          InsetCollapsable::metrics(mi, dim);
>          mi.base.font = tmpfont;
>          dim_ = dim;
> }
> 
> 
> void InsetERT::draw(PainterInfo & pi, int x, int y) const
> {
>          LyXFont tmpfont = pi.base.font;
>          getDrawFont(pi.base.font);
>          InsetCollapsable::draw(pi, x, y);
>          pi.base.font = tmpfont;
> }

Yes, apparently... but do you really need metrics() and draw() for
that? E.g., insetcharstyle does it without... just 
InsetCharStyle::getDrawFont().

Otherwise, this looks like going in the right direction. 

But what about adding a fourth display mode, Labelbelow, to the set?
Is that your next step? And where does the right mouse click (that
toggles this with Inlined) go in that case?

Good work! (especially the line count reduction :-)

- Martin

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to