The attached patch:

Renames class GraphicInset as GraphicRenderer.
Defines class ButtonRenderer (same metrics, draw functions as InsetButton).
Both these classes are derived from RenderedInset.

insets/graphicsinset.[Ch] is renamed as insets/renderers.[Ch]. Contains code 
for RenderedInset, ButtonRenderer, GraphicRenderer.

InsetExternal stores a boost::scoped_ptr<RenderedInset> renderer_ var, 
allowing it to change dynamically the way the external data is rendered on 
screen.

mathed/button_inset.[Ch] is removed. Mathed's commandInset now has a 
ButtonRenderer button_ member which is used to draw the inset on screen.

If you like this, then I guess that the next step is to remove InsetButton 
and to use ButtonRenderer further.

Comments/Suggestions?

-- 
Angus

Attachment: renderers.diff.gz
Description: GNU Zip compressed data

Reply via email to