}
-void Inset::setDimCache(MetricsInfo const & mi, Dimension const & dim) const
-{
- mi.base.bv->coordCache().insets().add(this, dim);
-}
-
-
Buffer const * Inset::updateFrontend() const
{
//FIXME (Abdel 03/12/10): see bugs #6814 and #6949
int xo(BufferView const & bv) const;
/// last drawn position for 'important' insets
int yo(BufferView const & bv) const;
- ///
- void setDimCache(MetricsInfo const &, Dimension const &) const;
/// do we cover screen position x/y?
bool covers(BufferView const & bv, int x, int y) const;
/// get the screen positions of the cursor (see note in Cursor.cpp)
dim.des += TEXT_TO_INSET_OFFSET;
// insert a one pixel gap
dim.wid += 1;
- // Cache the inset dimension.
- setDimCache(mi, dim);
Dimension dim_dummy;
MetricsInfo mi_dummy = mi;
InsetText::metrics(mi_dummy, dim_dummy);
theFontMetrics(font).rectText(label, w, a, d);
dim.des += int(d * 1.5);
}
-
- // cache the inset dimension
- setDimCache(mi, dim);
}
}
docstring ds(s.begin(), s.end());
dim.wid = fm.width(ds);
- setDimCache(mi, dim);
}
dim.asc = max(fm.maxAscent(), offset_ + height_);
dim.des = max(fm.maxDescent(), - offset_);
-
- // Cache the inset dimension
- setDimCache(mi, dim);
}
dim.asc = defaultRowHeight();
dim.des = defaultRowHeight();
dim.wid = mi.base.textwidth;
- // Cache the inset dimension.
- setDimCache(mi, dim);
}
}
-void InsetPhantom::metrics(MetricsInfo & mi, Dimension & dim) const
-{
- InsetCollapsable::metrics(mi, dim);
-
- // cache the inset dimension
- setDimCache(mi, dim);
-}
-
-
void InsetPhantom::draw(PainterInfo & pi, int x, int y) const
{
// draw the text
///
docstring layoutName() const;
///
- void metrics(MetricsInfo &, Dimension &) const;
- ///
void draw(PainterInfo & pi, int x, int y) const;
///
void write(std::ostream &) const;
dim.des += TEXT_TO_INSET_OFFSET;
// insert a one pixel gap
dim.wid += 1;
- // Cache the inset dimension.
- setDimCache(mi, dim);
Dimension dim_dummy;
MetricsInfo mi_dummy = mi;
InsetText::metrics(mi_dummy, dim_dummy);
// shut up compiler
break;
}
- // Cache the inset dimension.
- setDimCache(mi, dim);
}
}
if (dim.wid == 0)
dim.wid = fm.width(s);
-
- setDimCache(mi, dim);
}
dim.asc = height / 2 + (a - d) / 2; // align cursor with the
dim.des = height - dim.asc; // label text
dim.wid = ADD_TO_VSPACE_WIDTH + 2 * vspace_arrow_size + 5 + w;
- // Cache the inset dimension.
- setDimCache(mi, dim);
}
button_.update(screenLabel(), true);
}
button_.metrics(mi, dim);
- // Cache the inset dimension.
- setDimCache(mi, dim);
}
*/
dim.wid += leftMargin() + rightMargin();
metricsMarkers2(mi, dim);
- // Cache the inset dimension.
- setDimCache(mi, dim);
}
if (display())
dim.des += displayMargin();
}
- // Cache the inset dimension.
- setDimCache(mi, dim);
return;
}
math_font_max_dim(mi.base.font, asc, des);
dim.asc = max(dim.asc, asc);
dim.des = max(dim.des, des);
- // Cache the inset dimension.
- // FIXME: This will overwrite InsetMathGrid dimension, is that OK?
- setDimCache(mi, dim);
}
dim.wid += 6;
dim.des += 2;
dim.asc += 2;
-
- setDimCache(mi, dim);
}