>The problem is that it doesn't compile because of an >unresolved external: > >InsetTabular.obj : error LNK2019: unresolved external >symbol "public: __thiscall lyx::MetricsInfo::MetricsInfo >(void)" (??0metricsi...@lyx@@q...@xz) referenced in >function "public: virtual void __thiscall lyx:: >InsetTabular::draw(class lyx::Pa interInfo &,int,int) >const " (?d...@insettabular@lyx@@ubexaavpainteri...@2@h...@z)
This is because MetricsInfo::MetricsInfo() is not implemented. >The problem is that the MetricsInfo is not available. I tried to extend the >draw() routine so that it also grabs the MetricsInfo and the Dimension and >not only the PainterInfo but this fails too. >Is there a way to access the metrics? 1. You can store all the asc en desc of the cells in CellData. This can be done in InsetTabular::metrics. This is now also done for the rows. (cell_info[row][col].asc = ...). 2. Or, maybe you can call something like this: text_ = cellInset(cell)->text(); TextMetrics & tm = pi.base.bv->textMetrics(&text_); >p.s. I still don't understand how exactly dim.asc is calculated. Where >in the code is this done? Well. Have a look in the code then :S ? InsetTabular::metrics() calls InsetText::metrics() which calls TextMetrics::metrics() which calls ParagraphMetrics::ascent()... Vincent