Re: Headers/Footers Page numbers.


Subject: Re: Headers/Footers Page numbers.
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Fri Mar 16 2001 - 03:44:24 CST


> 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.

> 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.

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 :-).

Tomas



This archive was generated by hypermail 2b25 : Fri Mar 16 2001 - 03:45:04 CST