Re: Headers/Footers Page numbers.


Subject: Re: Headers/Footers Page numbers.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Fri Mar 16 2001 - 15:55:36 CST


On Fri, 16 Mar 2001, Tomas Frydrych wrote:

> > Hmm I don't think this would be much less expensive in the long run. My
> > idea was to grey the regular text when editting a Header/Footer and to
> > grey the header/footer when entering regular text. Setting a member
> > variable in every run of the document would be very expensive. The if(...)
> > statement of mine is not much more expensive than the if on the single
> > boolean.
>
> I suggested a static member, i.e., one shared by all runs. Thus,
> you would not be setting a member in each run, but have a static
> member function TextRun::setGreyed(bValue), which you would
> call once when entering/leaving the header editing mode. The if
> statement would not branch because we would have a specialised
> derived class for the header runs with a different logic, and also the
> if would not contain function calls, so there would be some saving; I
> think any saving in the draw routines is worth it.

Ahh I get it now. Unfortunately we can't use a pure static function since
Abi is a multi-view program. If we did changing thw grey state in one
window would change the grey state in all windows. The natural thing to do
is look up the overall fv_View attached to the runs. However when printing
no fv_View exists so we have to check for that first.

I'm still reluctant to use derived run subclasses for shadow sections
because of robustness and maintainability. We already have 12 different run
classes. In introducing shadowRuns would double that.

>
> > Actually the drawcolour/2 is really drawcolour.blue/2 drawcolour.red/2 and
> > drawcolor.green/2 which is probabally where the bulk of the loss in speed
> > will occur.
> I would not worry about this too much, since this will only happen
> when the stuff is greyed; when the main text is greyed, you are
> unlikely to scroll the main screen too much. I think the critical point
> is getting the drawing of the non-greyed runs in the main text
> hindred as little as possible.
>

You are absolutely right.

> However, if we are not going to grey anything (which is the
> impression I got from reading the rest of the chain), this is all
> academic (but I thought you of all people would not mind a bit of
> 'academic' discussion :-).

Well I certainly like academic discussion but in this case I do plan
to grey the header when not editting it and grey the text when edditing
the header.

Maybe I'll introduce a member variable in the block and set and clear
greyness for the range of blocks in the visible region.

Cheers

Martin



This archive was generated by hypermail 2b25 : Fri Mar 16 2001 - 15:55:54 CST