Re: Headers/Footers Page numbers.


Subject: Re: Headers/Footers Page numbers.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu Mar 15 2001 - 06:07:30 CST


On Thu, 15 Mar 2001, Tomas Frydrych wrote:

> > Martin:
> > What I will do unless others object:
> >
> > If there is a page number field already in the footer, I will justify just
> > the paragraph with the page number present to match the users request.
> >
> > Otherwise I will insert a paragraph containing just the page number
> > justified as the user requested at the beggining of the footer, moving the
> > remaining text down one line.
>
> Sounds like the optimal behaviour.

Ok I'll do this.

>
> > 2. Where and what should the header/footer dialog be?
> > HAve "Insert Header/footer" under "Insert". This just pops up
> > ...
> > Have "Remove Header/Footer" under "Edit"
> I think I would prefer both under 'Edit', as a submenu
> 'Headers/Footers', and then the two dialogs (or perhaps they could
> be merged into one?). Having two so closely related items on two
> different menus could be, IMO, confusing for the user.
>

This was my first suggestion but Thomas Fletcher said THAT would be
confusing :-)

> > I can put some more decorations around the header/footer when they're
> > being editted to make it blinding obvious they're being editted.
> >
> > I could also "grey" header/footer and regular text to distiguish which is
> > activated at any given time. This would be at the cost of the
> > following code on every draw..
> >
> > if(hdrFtrText && pView && pView->isEditHdrFtr() == false)
> > drawcolour = drawcolour/2;
> > else if(regularText && pView && pView->isEditHdrFtr())
> > drawcolour = drawcolour/2;
> >
>
> I would like it to be greyed like this, but would prefer if we could
> avoid such logic on each draw. I have not had a look at the
> header/footer code yet, but would it be possible to have a static
> member s_bGreyed in the TextRun class, that would be set when
> entering/leaving the Header/Footer Editing mode? That way we
> would only need
>
> if(s_bGreyed)
> drawcolour = drawcolour/2;
>
> and to have a derived class from TextRun for headers/footers, that
> would do
>
> if(!s_bGreyed)
> drawcolour = drawcolour/2;

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.

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.

Cheers

Martin



This archive was generated by hypermail 2b25 : Thu Mar 15 2001 - 06:08:03 CST