On Fri, Oct 10, 2003 at 12:10:29AM +0000, Angus Leeming wrote:
> Angus Leeming wrote:
> 
> > André, how does InsetFormula know when it is being edited?
> > Is the test below correct?
> > 
> > void InsetFormula::draw(PainterInfo & pi, int x, int y) const
> > {
> > // The previews are updated/drawn only when we're not editing the
> > inset. bool const editing_inset = mathcursor &&
> > mathcursor->formula() == this;
> 
> There's also this test. Which is 'better'/cheaper?
> 
> bool InsetFormula::PreviewImpl::previewWanted(Buffer const &) const {
>         return !parent_.par_->asNestInset()->editing();
> }

That's the test whether the math cursor is within a particular cell in a
larger formula.

So if we want only to preview full math insets, we'd use the test from
the previous mail. If we, however, also want to preview bits of a large
formula that are not currently being edited (like the n*m-1 'other'
cells of a big table), we'd ise this test here.

But I don't think the partial previewing work right now.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to