Angus Leeming <[EMAIL PROTECTED]> writes:

| As a purely hypothetical point:
| It seems to me that the insets have two separate aims.
| 1. To contain some information (In InsetCommand this is cmdname, options, contents)
| 2. To draw the inset on the screen.

yes.

| 
| Would it not be possible to have 
| 
| template <class DrawInset>
| class InsetCommand
| {
|       DrawInset di;
|       int ascent(Painter & p, LyXFont const & f) const { return di.ascent( p, f ); }
|       int descent(Painter & p, LyXFont const & f) const { return di.descent( p, f ); 
|}
|       int width(Painter & p, LyXFont const & f) const { return di.width( p, f ); }
|       void drawPainter & p, LyXFont const & f, int , float & x) const { di.draw( p, 
|f ); } }
| 

We don't want ot make InsetCommand a special case. All insets should
be have similary (form Coders POV), this means that if we split data
and view it, will have to be done for all insets.

        Lgb

Reply via email to