OOFILE  1.9
oofrepMac.cpp
Go to the documentation of this file.
1 // COPYRIGHT 1997 A.D. Software, All rights reserved
2 
3 // report-writer layer of OOFILE database
4 // renderer factories & renderers for Macintosh
5 
6 #ifndef H_OOF3
7  #include "oof3.h"
8 #endif
9 #ifndef H_OOFREP
10  #include "oofrep.h"
11 #endif
12 #ifndef H_OOFREPMAC
13  #include "oofRepMac.h"
14 #endif
15 #ifndef H_OOFGRPHS
16  #include "oofGrphs.h"
17 #endif
18 
19 
20 // ---------------------------------------
21 // o o f R e p M a c E n v
22 // ---------------------------------------
23 
24 void
26 {
27 // now the magic bit.
28 // by dereferencing this, we make an overriding function match against the virtual
29 // method that takes an oofRepMacEnv&.
30 // The implication is that, if we add an environment, each drawable must have a makeRender
31 // added to match, or it will not be rendered (the base empty method will be invoked).
32 
33 // eg: if we need to handle printing and previewing differently on the Mac, we would end up
34 // with a makeRender(const oofRepMacPrint&) and makeRender(const oofRepMacGUIPreviewPP&)
35 // for each oofRepDrawable
36 
37 // The alternative would be to have each environment know each drawable. That is far
38 // less extensible - users can add their own drawables that we wouldn't know about,
39 // so the environment classes wouldn't be closed for extension.
40  drawable->makeRender(*this);
41 }
42 
43 
44 void
46 {
47  drawable->makeRender(*this);
48 }
49 
50 
51 // a little bit of RTTI which can be used to record what kind of render last
52 // used, and could be used in switches if the above virtual multiple dispatch
53 // technique wasn't being used instead
56 {
57  return eRenderType;
58 }
59 
60 
61 void
62 oofRepMacEnv::pageSetup(THPrint inPageSetup)
63 {
64  if (inPageSetup) {
65  // Copy the one passed to us
66  mPrintRecordH = inPageSetup;
67  ::HandToHand((Handle*)&mPrintRecordH); // weird toolbox call copies the param and overwrites the param to return!
68  }
69  else
70  mPrintRecordH = 0;
71 }
72 
73 
74 void
75 oofRepMacEnv::drawPageBorder( long top, long left, long bottom, long right )
76 {
77 // client-specific hack!
78 // future will have way to attach border adorners to reports to specify same styles
79 
80  Rect borderInside;
81 
82  borderInside.left = left-1;
83  borderInside.right = right+1;
84  borderInside.top = top-1;
85  borderInside.bottom = bottom+1;
86 
87  FrameRect( &borderInside );
88 
89  borderInside.left = borderInside.left - 3;
90  borderInside.right = borderInside.right + 3;
91  borderInside.top = borderInside.top - 3;
92  borderInside.bottom = borderInside.bottom + 3;
93 
94  PenSize(2,2);
95  FrameRect( &borderInside );
96 
97  borderInside.left = borderInside.left - 2;
98  borderInside.right = borderInside.right + 2;
99  borderInside.top = borderInside.top - 2;
100  borderInside.bottom = borderInside.bottom + 2;
101 
102  PenSize(1,1);
103  FrameRect( &borderInside );
104 }
105 
106 // -------------------------------------------------------
107 // r e n d e r f a c t o r i e s
108 // -------------------------------------------------------
109 void
111 {
112  delete mRender; // assume if we're called and have existing it's wrong type
113  // as we descend through our bands making renderers, should mimic state of drawing
114  oofRepViewBand_Render* theRender = new oofRepViewBand_MacRender(this);
115  mRender = theRender;
116  mTableExtraRender = theRender;
118 }
119 
120 
121 void
123 {
124  MakeAnyRender();
125 }
126 
127 
128 void
130 {
131  delete mRender;
133 }
134 
135 
136 void
138 {
139  delete mRender;
141 }
142 
143 
144 void
146 {
147  delete mRender;
148  mRender = new oofRepLineBand_MacRender(this);
149 }
150 
151 
152 void
154 {
155  delete mRender;
156  mRender = new oofRepPictBand_MacRender(this);
157 }
158 
159 
160 void
162 {
163  delete mRender;
165 }
166 
167 
168 void
170 {
171  delete mRender;
173 }
174 
175 
176 void
178 {
179  delete mRender;
181 }
182 
183 
184 // -------------------------------------------------------
185 // o o f R e p V i e w B a n d _ M a c R e n d e r
186 // -------------------------------------------------------
189 {
190  return new oofRepViewBand_MacRender((oofRepViewBand*)newOwner); // safe downcast
191 }
192 
193 
194 void
196 {
198  if (!mDrawnColHeadersThisPage) // indicates will be drawing them
200 }
201 
202 
207 void
209 {
210  if (oofRep::currentReport()->shouldDrawViewColumnHeaders()) {
211  mDrawnColHeadersThisPage = false;
212  if (headersHaveChanged)
214  }
215  else
217 }
218 
219 
224 void
226 {
227  dbView* view = mOwner->view();
228  const unsigned short numFlds = view->count();
229 
230  ::TextFace(bold); // Hack for now !
231  view->start();
232  for (unsigned short i=0; i<numFlds; i++) {
233  mColHeaders.text(i) = view->getHeading(i);
234  mColHeaders.CalculateWrapping(i,view->colSizer()->width(i));
235  }
236 }
237 
238 
239 void
240 oofRepViewBand_MacRender::draw() // draws just current record
241 {
242  oofRep* curRep = oofRep::currentReport();
243  const oofRepSettings* currSettings = curRep->settings();
244  const short colSepWidth = currSettings->colSepWidth();
245  const unsigned short bandIndenting = currSettings->bandIndenting();
246  const unsigned long bodyWidth = curRep->bodyWidth();
247  const unsigned short leftMargin = currSettings->leftMargin();
248  oofRepTextStyle* style = mOwner->textStyle();
249 
250  curRep->changeTextStyle(style);
251  FontInfo fi;
252  ::GetFontInfo(&fi);
253  const short totalDescent = fi.descent + fi.leading + style->leading();
254  const unsigned short lineHeight = fi.ascent + totalDescent;
255 
256  dbView* view = mOwner->view();
257 
258  const unsigned numFlds=view->count();
259  oofSizedTextArray sizedBody(numFlds);
260 
261  // Setup for adorners
262  const unsigned long adornCount = mOwner->adorners().count();
263  unsigned long cellY;
264  if (adornCount) {
265  // Calculate the current record number we're drawing
266  cellY = view->recordNumber();
267  }
268  else
269  cellY = 0;
270 
271  unsigned int i;
272 
273  // Get the field text and calculate the wrapping and height
274  view->start();
275  bool hasCustomDrawers=false;
276  unsigned long maxCustomDrawerHeight = 0;
277  for (unsigned int i=0; i<numFlds; i++) {
278  oofRepCustomViewDrawer* theDrawer = mOwner->customDrawer(i);
279  if (theDrawer) {
280  hasCustomDrawers = true;
281  unsigned long wrappedHeight;
282  theDrawer->calculateWrapping(&view->field(i), view->colSizer()->width(i), wrappedHeight);
283  if (wrappedHeight>maxCustomDrawerHeight)
284  maxCustomDrawerHeight = wrappedHeight;
285  curRep->changeTextStyle(style); // in case custom drawer changed
286  }
287  else {
288  sizedBody.text(i) = view->field(i).copyString();
289  sizedBody.CalculateWrapping(i,view->colSizer()->width(i));
290  }
291  }
292  unsigned short colHeaderHeight = 0;
294  colHeaderHeight = mColHeaders.maxRows()*lineHeight; // add in col headers when deciding if room on page
295 
296  unsigned short rowDrawHeight = sizedBody.maxRows()*lineHeight;
297  if (maxCustomDrawerHeight>rowDrawHeight)
298  rowDrawHeight = maxCustomDrawerHeight;
299  const unsigned short DrawHeight = rowDrawHeight + colHeaderHeight;
300 
301  // Render the Fields
302  unsigned long xPos=leftMargin+bandIndenting;
303 
304  if((DrawHeight+curRep->currentVerticalPos())>curRep->bodyEnd()) {
305  // We don't fit, and we'll need to cope with this !
306  DrawContinuingOverPage(0,DrawHeight,sizedBody,fi, hasCustomDrawers);
307  } else {
308  if (adornCount) {
309  xPos+=colSepWidth/2;
310  }
313 // restore the style - headers may have changed
314  curRep->changeTextStyle(style);
315  }
316 
317  for(i=0;i<numFlds;i++) {
318  oofColSizer::colAlignT alignment = view->colSizer()->alignment(i);
319  // Cope with natural alignment
320  if(alignment==oofColSizer::alignNatural)
321  alignment = oofColSizer::naturalAlignmentForField(view->field(i).fieldType());
322 
323  int ybase=curRep->currentVerticalPos()-totalDescent;
324 
325  // Adorner information for the cell
326  unsigned long cellWidth = view->colSizer()->width(i) + colSepWidth ;
327  unsigned long cellHeight = rowDrawHeight;
328  int cellHorizontalPos = xPos-(colSepWidth/2);
329  int cellVerticalPos = curRep->currentVerticalPos()-1;
330 
331  if( i==numFlds-1 ) { // resize the last cell to right edge
332  cellWidth = bodyWidth - bandIndenting + leftMargin + (colSepWidth/2) - xPos;
333  }
334 
335  if (adornCount) {
336  // call before adorners for cell
337  mOwner->adorners().start();
338  for( long ad=0; ad<adornCount; ad++ ) {
339  oofAdorner* currentAdorner = mOwner->adorners().current();
340  if( currentAdorner->drawWhen() == oofAdorner::drawBefore ) {
341  ::MoveTo(cellHorizontalPos, cellVerticalPos);
342  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth );
343  }
344  mOwner->adorners().next();
345  }
346  }
347 
348  // draw the contents of the cell
349  oofRepCustomViewDrawer* theDrawer = mOwner->customDrawer(i);
350  if (theDrawer) {
351  theDrawer->draw(xPos, ybase);
352  curRep->changeTextStyle(style); // in case custom drawer changed
353  }
354  else { // draw normal text
355  short numrows=sizedBody.GetNumRows(i);
356  const unsigned long* lines = sizedBody.GetLineStarts(i);
357  const unsigned long* lengths = sizedBody.GetLineLengths(i);
358  short bytes;
359  for(unsigned short rownum=0;rownum<numrows;rownum++){
360  if (lengths[rownum]) {
361  unsigned long drawPos;
362  switch(alignment){
363  case (oofColSizer::alignRight):{
364  drawPos=xPos+view->colSizer()->width(i)-lengths[rownum];
365  }
366  break;
367  case (oofColSizer::alignCentre):{
368  drawPos=xPos+((view->colSizer()->width(i)-lengths[rownum])/2);
369  }
370  break;
371  default: drawPos=xPos;
372  break;
373  }
374  ::MoveTo(drawPos, ybase+(rownum+1)*lineHeight);
375  if(rownum==(numrows-1))
376  bytes=sizedBody.text(i).length()-lines[rownum];
377  else
378  bytes=lines[rownum+1]-lines[rownum];
379 
380  const char* mainText = sizedBody.text(i);
381  const char* drawText = mainText + lines[rownum];
382  while ((bytes>0) && (
383  (drawText[bytes-1]==0x0A) || (drawText[bytes-1]==0x0D)
384  )) // skip trailing linefeeds or CR's
385  --bytes;
386  ::DrawText(drawText,0,bytes);
387  } // if any length in this row
388  } // loop through rows of report
389  } // custom or default text draw
390 
391  if (adornCount) {
392  // call after adorners for cell
393  mOwner->adorners().start();
394  for( long ad=0; ad<adornCount; ad++ ) {
395  oofAdorner* currentAdorner = mOwner->adorners().current();
396  if( currentAdorner->drawWhen() == oofAdorner::drawAfter ) {
397  ::MoveTo(cellHorizontalPos, cellVerticalPos);
398  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth );
399  }
400  mOwner->adorners().next();
401  }
402  }
403  xPos+=view->colSizer()->width(i)+colSepWidth;
404  }
405  curRep->currentVerticalPos() += rowDrawHeight;
406  }
407 }
408 
409 
410 void
411 oofRepViewBand_MacRender::DrawContinuingOverPage(unsigned long startRow, unsigned long heightLeft,
412  oofSizedTextArray& sizedBody, FontInfo &fi, bool hasCustomDrawers)
413 {
414 // NOTE heightLeft will include the height of the column headers if they are still to be printed
415 
416  dbView* view = mOwner->view();
417  //bool isBoxed = mOwner->isBoxed();
418  const unsigned numFlds=view->count();
419  oofRep* curRep = oofRep::currentReport();
420  const oofRepSettings* currSettings = curRep->settings();
421  const short colSepWidth = currSettings->colSepWidth();
422  const unsigned short bandIndenting = currSettings->bandIndenting();
423  const unsigned long bodyWidth = curRep->bodyWidth();
424  const unsigned short leftMargin = currSettings->leftMargin();
425  oofRepTextStyle* style = mOwner->textStyle();
426 
427  const unsigned long adornCount = mOwner->adorners().count();
428  unsigned long cellY;
429 
430  if (adornCount) {
431  // Calculate the current record number we're drawing
432  cellY = view->recordNumber();
433  }
434  else
435  cellY = 0;
436 
437  unsigned long xPos=leftMargin+bandIndenting;
438  bool lastpage=false;
439  unsigned long DrawHeight, rowDrawHeight=0;
440 
441 // draw whatever fits on the page, or the remaining portion of the record
442  long roomLeftOnPage = curRep->bodyEnd() - curRep->currentVerticalPos();
443  if (roomLeftOnPage<0)
444  roomLeftOnPage = 0; // even one line won't fit, so force to next page
445 
446  if (heightLeft > roomLeftOnPage)
447  DrawHeight = roomLeftOnPage; // WARNING may be less than one line room left!!!
448  else {
449  DrawHeight=heightLeft;
450  lastpage=true;
451  }
452 
453  const long totalDescent = fi.descent + fi.leading + style->leading();
454  const unsigned long lineHeight = fi.ascent + totalDescent;
455 
456  unsigned long possiblerows;
458  const unsigned long colHeaderHeight = mColHeaders.maxRows()*lineHeight;
459 // colHeaderHeight will only be non-zero if we are drawing headers and haven't yet drawn them
460  rowDrawHeight = DrawHeight-colHeaderHeight;
461  if (DrawHeight > colHeaderHeight)
462  possiblerows = rowDrawHeight/lineHeight; // must be truncation divide - don't draw half rows
463  else
464  possiblerows = 0;
465  }
466  else {
467  possiblerows=DrawHeight/lineHeight; // could be zero rows if a single line too tall
468  rowDrawHeight = DrawHeight;
469  }
470 
471  unsigned long maxCustomDrawerHeight = 0; // largest chunk drawn by a custom drawer
472  // helps define total height drawn if a custom drawer is a few pixels higher than adjacent rows of uniform text
473  unsigned long maxCustomDrawerHeightLeft = 0; // our total left - allows for custom drawers to take more room
474  // drawing in chunks than in the original estimate of a single chunk, so our incoming heightLeft may be too low
475  // if we have a page break this page - see the correction before recursing below
476 
477  if (hasCustomDrawers) {
478  // repeat a loop to calc height each page because we don't assume that N rows are
479  // consumed, unlike the plain text, as we know NOTHING about what is drawn and
480  // a custom drawer is free to consume more height over multiple pages than it
481  // said its unbroken total height would be
482  for (unsigned int i=0; i<numFlds; i++) {
483  oofRepCustomViewDrawer* theDrawer = mOwner->customDrawer(i);
484  if (theDrawer) {
485  unsigned long drawnHeight;
486  const unsigned long heightLeftToDraw = theDrawer->calcNextDrawHeight(rowDrawHeight, drawnHeight);
487  if (drawnHeight > maxCustomDrawerHeight)
488  maxCustomDrawerHeight = drawnHeight;
489  assert(drawnHeight<=rowDrawHeight);
490  if (heightLeftToDraw>0) {
491  lastpage=false; // correction to calc above, in case the custom draw broke in a way
492  // that changed the remaining height we've been passing through. We might have thought
493  // this is the last page because other columns fit, but this could correct that.
494  if (heightLeftToDraw > maxCustomDrawerHeightLeft)
495  maxCustomDrawerHeightLeft = heightLeftToDraw;
496  } // height to draw
497  curRep->changeTextStyle(style); // in case custom drawer changed
498  } // custom drawer
499  } // loop fields to see if have custom draw
500  } // if has custom draw
501 
502  unsigned short rowsDrawn;
503  if(lastpage || possiblerows>1){ // don't allow a widow left on page if more than one row to draw
504 
505  if (adornCount) {
506  xPos+=colSepWidth/2;
507  }
508 
509  // we know we have made room for the col headers if not drawn on this page
512 // restore the style - headers may have changed
513  curRep->changeTextStyle(style);
514  }
515 
516  for(unsigned i=0;i<numFlds;i++){
517  oofColSizer::colAlignT alignment = view->colSizer()->alignment(i);
518  // Cope with natural alignment
519  if(alignment==oofColSizer::alignNatural)
520  alignment = oofColSizer::naturalAlignmentForField(view->field(i).fieldType());
521 
522  int ybase=curRep->currentVerticalPos()-totalDescent;
523 
524  // Adorner information for the cell
525  unsigned long cellWidth = view->colSizer()->width(i) + colSepWidth;
526  unsigned long cellHeight = rowDrawHeight;
527  int cellHorizontalPos = xPos-(colSepWidth/2);
528  int cellVerticalPos = curRep->currentVerticalPos()-1;
529 
530  if( i==numFlds-1 ) { // resize the last cell to right edge
531  cellWidth = curRep->bodyWidth() - currSettings->bandIndenting() +
532  currSettings->leftMargin() + (colSepWidth/2) - xPos;
533  }
534 
535  if (adornCount) {
536  // call before adorners for cell
537  mOwner->adorners().start();
538  for( long ad=0; ad<adornCount; ad++ ) {
539  oofAdorner* currentAdorner = mOwner->adorners().current();
540  if( currentAdorner->drawWhen() == oofAdorner::drawBefore ) {
541  ::MoveTo(cellHorizontalPos, cellVerticalPos);
542  // draw the correct style for draw overrun cells
543  if( lastpage ) {
544  if( startRow ) {
545  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::continueStop );
546  } else {
547  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::startStop );
548  }
549  } else {
550  if( !startRow ) {
551  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::startContinue );
552  } else {
553  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::continueContinue );
554  }
555  }
556  }
557  mOwner->adorners().next();
558  }
559  }
560 
561  oofRepCustomViewDrawer* theDrawer = mOwner->customDrawer(i);
562  if (theDrawer) {
563  theDrawer->draw(xPos, ybase); // draws fragment calculated by calcNextDrawHeight() above
564  curRep->changeTextStyle(style); // in case custom drawer changed style
565  }
566  else {
567  long numRowsThisPage=sizedBody.GetNumRows(i)-startRow;
568  if(numRowsThisPage<0) // This field might not have any more rows to draw
569  numRowsThisPage=0;
570  if(numRowsThisPage>possiblerows)
571  numRowsThisPage=possiblerows;
572  const unsigned long* lines = sizedBody.GetLineStarts(i);
573  const unsigned long* lengths = sizedBody.GetLineLengths(i);
574  short bytes;
575  // OK - for clarity:
576  // * rownum is always 0-based here, but is offset by startRow from the actual textSizer row
577  // * numRowsThisPage is the number of rows we can fit on this page
578  // So we always use these values unmodified for calculating position, BUT
579  // we use them offset for any calculations on the sizer info...
580  for(unsigned short rownum=0;rownum<numRowsThisPage;rownum++){
581  if (lengths[rownum]) {
582  unsigned long drawPos;
583  switch(alignment){
584  case (oofColSizer::alignRight):{
585  drawPos=xPos+view->colSizer()->width(i)-lengths[rownum];
586  }
587  break;
588  case (oofColSizer::alignCentre):{
589  drawPos=xPos+((view->colSizer()->width(i)-lengths[rownum])/2);
590  }
591  break;
592  default: drawPos=xPos;
593  break;
594  }
595  ::MoveTo(drawPos, ybase+(rownum+1)*lineHeight);
596  if(rownum+startRow==(sizedBody.GetNumRows(i)-1))
597  bytes=sizedBody.text(i).length()-lines[rownum+startRow];
598  else
599  bytes=lines[rownum+startRow+1]-lines[rownum+startRow];
600 
601  const char* mainText = sizedBody.text(i);
602  const char* drawText = mainText + lines[rownum+startRow];
603  while ((bytes>0) && (
604  (drawText[bytes-1]==0x0A) || (drawText[bytes-1]==0x0D)
605  )) // skip trailing linefeeds or CR's
606  --bytes;
607  ::DrawText(drawText,0,bytes);
608  } // if any length in this row
609  } // loop through rows of report
610  } // draw cu
611 
612  if (adornCount) {
613  // call after adorners for cell
614  mOwner->adorners().start();
615  for( long ad=0; ad<adornCount; ad++ ) {
616  oofAdorner* currentAdorner = mOwner->adorners().current();
617  if( currentAdorner->drawWhen() == oofAdorner::drawAfter ) {
618  ::MoveTo(cellHorizontalPos, cellVerticalPos);
619  // draw the correct style for draw overrun cells
620  if( lastpage ) {
621  if( startRow ) {
622  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::continueStop );
623  } else {
624  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::startStop );
625  }
626  } else {
627  if( !startRow ) {
628  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::startContinue );
629  } else {
630  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth, oofAdorner::continueContinue );
631  }
632  }
633  }
634  mOwner->adorners().next();
635  }
636  }
637  xPos+=view->colSizer()->width(i)+colSepWidth;
638  }
639  rowsDrawn = possiblerows;
640  unsigned long heightDrawn = rowsDrawn*lineHeight;
641  if (maxCustomDrawerHeight > heightDrawn)
642  heightDrawn = maxCustomDrawerHeight; // may have custom draw go a few pixels past the rows
643  assert (heightDrawn <= DrawHeight); // difference is fractional row that didn't fit
644  heightLeft -= heightDrawn;
645  if (maxCustomDrawerHeightLeft > heightLeft)
646  heightLeft = maxCustomDrawerHeightLeft; // may have custom draw extend the earlier total
647  } // fitted at least 2 rows
648  else {
649 // heightLeft stays the same as on entry - ie: we've called overrun from draw because row didn't fit entirely on original page
650  rowsDrawn = 0;
651  }
652 
653  if(!lastpage){
654  oofRepEnvironment* theEnv = curRep->environment();
655  theEnv->splitBandOverPage();
656  curRep->drawPageBreak();
657 
658  // unconditionally draw headers - we KNOW we haven't drawn them
659  theEnv->resumeBandOverPage();
660  mOwner->drawColumnHeaders(); // NOT YET IMPLEMENTED - setting to say that we don't draw these on subsequent pages
661  curRep->changeTextStyle(style); // In case the page break or col headers changed styles
662  DrawContinuingOverPage(startRow+rowsDrawn, heightLeft, sizedBody, fi, hasCustomDrawers);
663  }
664  else
665  curRep->currentVerticalPos() += DrawHeight;
666 }
667 
668 
669 void
671 {
672  oofRep* curRep = oofRep::currentReport();
673  const oofRepSettings* currSettings = curRep->settings();
674  const short colSepWidth = currSettings->colSepWidth();
675 
676  mDrawnColHeadersThisPage = true; // not conditional! we want to avoid calling this method again this page
677  if (!curRep->shouldDrawViewColumnHeaders())
678  return;
679 
680  dbView* view = mOwner->view();
681  const unsigned short numFlds = view->count();
682  //const bool isBoxed = mOwner->isBoxed();
683 
684  curRep->changeTextStyle(mOwner->textStyle());
685  TextFace(bold); // Hack for now !
686  FontInfo fi;
687  ::GetFontInfo(&fi);
688  const short totalDescent = fi.descent + fi.leading + mOwner->textStyle()->leading();
689  const unsigned short lineHeight = fi.ascent + totalDescent;
690  const short DrawHeight = mColHeaders.maxRows()*lineHeight;
691 
692  // Render the Headers
693  unsigned long xPos=currSettings->leftMargin()+currSettings->bandIndenting();
694 
695  const unsigned long adornCount = mOwner->adorners().count();
696  unsigned long cellY = 0;
697 
698  // not necessary as headers can't be the last cell
699  //if (adornCount) {
700  // // Calculate the current record number we're drawing
701 
702  if( adornCount ) {
703  xPos+=colSepWidth/2;
704  }
705 
706  for(unsigned short i=0;i<numFlds;i++){
707  const unsigned short numrows = mColHeaders.GetNumRows(i);
708  const unsigned long* lines = mColHeaders.GetLineStarts(i);
709  const unsigned long* lengths = mColHeaders.GetLineLengths(i);
710  short bytes;
711  oofColSizer::colAlignT alignment = view->colSizer()->alignment(i);
712  // Cope with natural alignment
713  if(alignment==oofColSizer::alignNatural)
714  alignment = oofColSizer::naturalAlignmentForField(view->field(i).fieldType());
715 
716  const int ybase=curRep->currentVerticalPos() - totalDescent;
717 
718  // Adorner information for the cell
719  unsigned long cellWidth = view->colSizer()->width(i) + colSepWidth ;
720  unsigned long cellHeight = DrawHeight;
721  int cellHorizontalPos = xPos-(colSepWidth/2);
722  int cellVerticalPos = curRep->currentVerticalPos()-1;
723 
724  if( i==numFlds-1 ) { // resize the last cell to right edge
725  cellWidth = curRep->bodyWidth() - currSettings->bandIndenting() +
726  currSettings->leftMargin() + (colSepWidth/2) - xPos;
727  }
728 
729  if (adornCount) {
730  // call before adorners for cell
731  mOwner->adorners().start();
732  for( long ad=0; ad<adornCount; ad++ ) {
733  oofAdorner* currentAdorner = mOwner->adorners().current();
734  if( currentAdorner->drawWhen() == oofAdorner::drawBefore ) {
735  ::MoveTo(cellHorizontalPos, cellVerticalPos);
736  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth );
737  }
738  mOwner->adorners().next();
739  }
740  }
741 
742  for(unsigned short rownum=0;rownum<numrows;rownum++){
743  unsigned long drawPos;
744  switch(alignment){
745  case (oofColSizer::alignRight):{
746  drawPos=xPos+view->colSizer()->width(i)-lengths[rownum];
747  }
748  break;
749  case (oofColSizer::alignCentre):{
750  drawPos=xPos+((view->colSizer()->width(i)-lengths[rownum])/2);
751  }
752  break;
753  default: drawPos=xPos;
754  break;
755  }
756  ::MoveTo(drawPos, ybase+(rownum+1)*lineHeight);
757  const OOF_String& text = mColHeaders.text(i);
758  if(rownum==(numrows-1))
759  bytes=text.length()-lines[rownum];
760  else
761  bytes=lines[rownum+1]-lines[rownum];
762  ::DrawText(text,lines[rownum],bytes);
763  }
764 /*
765 original underlining of headers
766  ::MoveTo(xPos,ybase+numrows*lineHeight+1);
767  ::PenSize(1,1);
768  ::Line(view->colSizer()->width(i),0); // Rule under the headings
769 */
770  if (adornCount) {
771  // call after adorners for cell
772  mOwner->adorners().start();
773  for( long ad=0; ad<adornCount; ad++ ) {
774  oofAdorner* currentAdorner = mOwner->adorners().current();
775  if( currentAdorner->drawWhen() == oofAdorner::drawAfter ) {
776  ::MoveTo(cellHorizontalPos, cellVerticalPos);
777  currentAdorner->drawcell( i, cellY, mOwner, cellHeight, cellWidth );
778  }
779  mOwner->adorners().next();
780  }
781  }
782 
783  xPos+=view->colSizer()->width(i)+colSepWidth;
784  //if((isBoxed)&&(i<numFlds-1)){
785  // MoveTo(xPos-(colSepWidth/2), curRep->currentVerticalPos());
786  // Line(0,DrawHeight);
787  //}
788  }
789  curRep->currentVerticalPos() += DrawHeight;
790 }
791 
792 
793 // -------------------------------------------------------
794 // o o f R e p L a y o u t B a n d _ M a c R e n d e r
795 // -------------------------------------------------------
798 {
799  return new oofRepLayoutBand_MacRender((oofRepLayoutBand*)newOwner); // safe downcast
800 }
801 
802 
803 void
805 {
806  Point penLoc;
807 
808  oofRepBlockList& blocks = mOwner->blocks();
809  blocks.start();
810  // Move to the initial position below which blocks are aligned
811  ::MoveTo( oofRep::currentReport()->settings()->leftMargin()
812  +oofRep::currentReport()->settings()->bandIndenting(),
813  oofRep::currentReport()->currentVerticalPos());
814  while(blocks.more()) {
815  oofRepBlock* theBlock = blocks();
816  // KENTODO - Handle other alignments !
817  // BOLD ASSUMPTION - only one right aligned item per line.
818  if(theBlock->align()==oofRepBlock::alignRight){
819  ::GetPen(&penLoc);
820 
821  ::Move(-penLoc.h
825  -theBlock->width(),0);
826  }
827  if(theBlock->align()==oofRepBlock::alignCentre) {
828  ::GetPen(&penLoc);
829  const long newX = -penLoc.h+oofRep::currentReport()->settings()->leftMargin() + (oofRep::currentReport()->bodyWidth()-theBlock->width())/2;
830  ::Move(newX,0);
831  }
832  ::GetPen(&penLoc);
833  SetCurrentBlockCoords(penLoc.h, penLoc.v, theBlock); // save for callbacks
834  theBlock->draw();
835  if (theBlock->fixedWidth())
836  ::Move(theBlock->fixedWidth() - theBlock->width(), 0); // move horizontally
837  if (theBlock->moveDownAfter()){
838  ::GetPen(&penLoc);
839  Move(-penLoc.h
842  theBlock->fixedHeight());
843  // Terminate this line
844  blocks.next();
845 /*
846  if(blocks.more()){
847  oofRep::currentReport()->changeTextStyle(blocks()->textStyle());
848  ::GetFontInfo(&fi);
849  ::Move(0,fi.ascent);
850  }
851 */
852  } else
853  blocks.next();
854  }
855 
857 }
858 
859 // -------------------------------------------------------
860 // o o f R e p L i n e B a n d _ M a c R e n d e r
861 // -------------------------------------------------------
864 {
865  return new oofRepLineBand_MacRender((oofRepLineBand*)newOwner); // safe downcast
866 }
867 
868 void
870 {
871  unsigned long fixedHeight = mOwner->fixedHeight();
874  oofRep::currentReport()->currentVerticalPos()+fixedHeight,
876 
877 #if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON!=0
878  Pattern drawPat;
879  if( mOwner->grey() ){
880 
881  FillRect(&theLine,::GetQDGlobalsGray(&drawPat));
882  PenPat(::GetQDGlobalsGray(&drawPat));
883  }
884  else{
885  ::FillRect(&theLine,::GetQDGlobalsBlack(&drawPat));
886  ::PenPat(::GetQDGlobalsBlack(&drawPat));
887  }
888  FrameRect(&theLine);
889  ::PenPat(GetQDGlobalsBlack(&drawPat));
890 #else
891  if( mOwner->grey() ){
892  ::FillRect(&theLine,&qd.gray);
893  ::PenPat(&qd.gray);
894  } else {
895  ::FillRect(&theLine,&qd.black);
896  ::PenPat(&qd.black);
897  }
898  ::PenPat(&qd.black);
899 #endif
900  oofRep::currentReport()->currentVerticalPos() += fixedHeight;
901 }
902 
903 
904 // -------------------------------------------------------
905 // o o f R e p P i c t B a n d _ M a c R e n d e r
906 // -------------------------------------------------------
909 {
910  return new oofRepPictBand_MacRender((oofRepPictBand*)newOwner); // safe downcast
911 }
912 
913 
914 
915 void
917 {
918  unsigned long fixedHeight = mOwner->fixedHeight();
919 
920  const unsigned short leftMargin = oofRep::currentReport()->settings()->leftMargin();
921  const unsigned short topBand = oofRep::currentReport()->currentVerticalPos();
922  oofPict* thePict = mOwner->picture();
923  if (thePict) {
924  thePict->draw(
925  leftMargin,
926  topBand,
927  leftMargin + oofRep::currentReport()->bodyWidth(),
928  topBand+fixedHeight
929  );
930  }
931  oofRep::currentReport()->currentVerticalPos() += fixedHeight;
932 }
933 
934 
935 // -------------------------------------------------------
936 // o o f R e p S p a c e B a n d _ M a c R e n d e r
937 // -------------------------------------------------------
940 {
941  return new oofRepSpaceBand_MacRender((oofRepSpaceBand*)newOwner); // safe downcast
942 }
943 
944 
945 void
947 {
949 }
950 
951 
952 // -------------------------------------------------------
953 // o o f R e p G r a p h B a n d _ M a c R e n d e r
954 // -------------------------------------------------------
957 {
958  return new oofRepGraphBand_MacRender((oofRepGraphBand*)newOwner); // safe downcast
959 }
960 
961 
962 void
964 {
965  oofRep* currentReport = oofRep::currentReport();
966  bool printMono = currentReport->environment()->isPrintingEnvironment() && currentReport->settings()->printGraphsInMono();
967  if (printMono)
969 
970  currentReport->changeTextStyle(mOwner->textStyle());
971 
972  const unsigned long drawingHeight = mOwner->drawingHeight();
973  const unsigned long bodyWidth = currentReport->bodyWidth();
974  const unsigned long graphWidth = mOwner->graphWidth();
975  const unsigned long graphHeight = mOwner->graphHeight();
976 
977  assert(mOwner->graphWidth()>0);
978 
979  oofRect theFrame;
980 
981  unsigned long graphLeft, graphRight, graphBottom, graphTop;
982  if (bodyWidth > graphWidth) {
983  graphLeft = (bodyWidth-graphWidth)/2;
984  graphRight = graphWidth+graphLeft;
985  }
986  else {
987  graphLeft = 0;
988  graphRight = bodyWidth;
989  }
990  if (drawingHeight > graphHeight) {
991  graphTop = (drawingHeight-graphHeight)/2;
992  graphBottom = graphTop+graphHeight;
993  }
994  else {
995  graphTop = 0;
996  graphBottom = drawingHeight;
997  }
998  theFrame.set(graphLeft,graphTop,graphRight ,graphBottom);
999 
1000  theFrame.offset(currentReport->settings()->leftMargin(),
1001  currentReport->currentVerticalPos());
1002 
1003  mOwner->graph()->setPaneRect(theFrame);
1004 
1005  #ifdef OOF_DEBUG_GRAPHS
1006  ofstream logFile(mOwner->graph()->getTitle(),ios::out);
1007  mOwner->graph()->describe(logFile);
1008  logFile.close;
1009  #endif
1010 
1011  //end logging stuff
1012  mOwner->graph()->draw();
1013 
1014  currentReport->currentVerticalPos() += drawingHeight;
1015 
1016  if (printMono)
1018 }
1019 
1020 
1021 // -------------------------------------------------------
1022 // o o f R e p G r a p h B a n d _ M a c P r i n t R e n d e r
1023 // -------------------------------------------------------
1024 oofRepRender*
1026 {
1027  return new oofRepGraphBand_MacPrintRender((oofRepGraphBand*)newOwner); // safe downcast
1028 }
1029 
1030 
1031 void
1033 {
1034  bool printMono = oofRep::currentReport()->settings()->printGraphsInMono();
1035  if (printMono)
1036  mOwner->graph()->setStyleToMono();
1038  if (printMono)
1040 }
1041 
1042 
1043 // -------------------------------------------------------
1044 // o o f R e p T e x t B l o c k _ M a c R e n d e r
1045 // -------------------------------------------------------
1046 oofRepRender*
1048 {
1049  return new oofRepTextBlock_MacRender((oofRepTextBlock*)newOwner); // safe downcast
1050 }
1051 
1052 
1053 void
1055 {
1056 // draw below the current position, so temporarily duck down to Mac font baseline
1057 // then return
1059  FontInfo fi;
1060  ::GetFontInfo(&fi);
1061  ::Move(0,fi.ascent);
1062  const OOF_String& text = mOwner->text();
1063  ::DrawText(text,0,text.length());
1064  ::Move(0,-fi.ascent);
1065 }
1066 
1067 
1068 unsigned long
1070 {
1072  const OOF_String& text = mOwner->text();
1073  unsigned long ret = ::TextWidth(text,0,text.length());
1074  return ret;
1075 }
1076 
1077 // -------------------------------------------------------
1078 // o o f R e p P i c t B l o c k _ M a c R e n d e r
1079 // -------------------------------------------------------
1080 oofRepRender*
1082 {
1083  return new oofRepPictBlock_MacRender((oofRepPictBlock*)newOwner); // safe downcast
1084 }
1085 
1086 void
1088 {
1089 // draw below the current location, so align with the top of any text on this line
1090  oofPict* thePict = mOwner->picture();
1091  const long pictWidth = mOwner->width();
1092  // unlike Windows, Mac draw is called as we actually draw so gets coords from the port
1093  Point penLoc;
1094  ::GetPen(&penLoc);
1095  const long x = penLoc.h;
1096  const long right = x + pictWidth;
1097  const long y = penLoc.v;
1098  const long bottom = y + mOwner->fixedHeight();
1099  if (thePict) {
1100  thePict->draw(x, y, right, bottom);
1101  }
1102  ::Move(pictWidth, 0); // move horizontally width of the picture
1103 }
1104 
1105 
1106 unsigned long
1108 {
1109  return mOwner->width();
1110 }
1111 
void colSizer(oofColSizer *adoptedSizer)
Definition: oofsize.cpp:71
Cross-platform way to specify rectangle with Mac-style setter.
Definition: oofRect.h:39
virtual bool isPrintingEnvironment() const
Definition: oofrep2.cpp:1232
virtual oofRepTextStyle * textStyle() const
Definition: oofrep1.cpp:1622
void start()
Definition: oof1.h:1505
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:1025
oofRepViewBand_MacRender(oofRepViewBand *b)
Definition: oofrepMac.h:169
oofRepPictBand * mOwner
Definition: oofreprn.h:97
short leading() const
Definition: oofrep.h:2563
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:797
virtual unsigned long fixedHeight()
Definition: oofrep.h:2222
virtual unsigned long width() const
Definition: oofrepMac.cpp:1069
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:169
void setStyleToColor()
Definition: oofGrphs.cpp:183
virtual unsigned long fixedHeight()
Definition: oofrep.h:2179
virtual dbView * view(unsigned short whichView=0) const
Request a dbView which may be the source of data for the item.
Definition: oofrep2.cpp:272
Abstract base for anything drawn on report.
Definition: oofrep.h:860
virtual void makeRender(const oofRepMacEnv &)
Definition: oofrepMac.cpp:137
Array of oofStrings paired with oofTextSizer.
Definition: oofdraw.h:127
oofRepTextBlock_MacRender(oofRepTextBlock *b)
Definition: oofrepMac.h:190
unsigned short maxRows() const
Definition: oofdraw.h:377
unsigned long graphWidth() const
Definition: oofrep.h:2679
oofRepEnvironment * environment() const
Definition: oofrep.h:1900
void next()
Definition: oofrep.h:2385
virtual void calculateWrapping(const dbField *, unsigned long sizedWidth, unsigned long &wrappedHeight)=0
void describe(std::ostream &os) const
Definition: oofGrphs.cpp:93
void setPaneRect(Rect inRect)
Definition: oofGrphs.cpp:105
virtual oofRepRenderT renderType() const
Definition: oofrepMac.cpp:55
oofRepSpaceBand * mOwner
Definition: oofreprn.h:31
oofRepLayoutBand_MacRender(oofRepLayoutBand *b)
Definition: oofrepMac.h:130
oofRepCustomViewDrawer * customDrawer(unsigned short col)
Definition: oofrep2.cpp:172
Macintosh structure for a rectangle.
Call oofPict::draw positioned centred within oofRepPictBand.
Definition: oofrepMac.h:153
oofRepLayoutBand * mOwner
Definition: oofreprn.h:69
bool mDrawnColHeadersThisPage
Definition: oofreprn.h:148
virtual bool shouldDrawViewColumnHeaders() const
Definition: oofrep1.cpp:726
void drawColumnHeaders()
Definition: oofrep2.cpp:340
const dbField & field(unsigned int) const
Definition: oofview.h:206
virtual void drawColumnHeaders()
Definition: oofrepMac.cpp:670
unsigned long graphHeight() const
Definition: oofrep.h:2686
virtual unsigned long width() const
Definition: oofrepMac.cpp:1107
blockAlignT align() const
Definition: oofrep.h:2205
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:863
Most commonly used top band in a report.
Definition: oofrep.h:1283
oofAdornerList & adorners()
Definition: oofadorn.h:354
void draw()
Definition: oofGrphs.cpp:81
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:177
oofRepSpaceBand_MacRender(oofRepSpaceBand *b)
Definition: oofrepMac.h:90
void DrawContinuingOverPage(unsigned long, unsigned long, oofSizedTextArray &, FontInfo &, bool hasCustomDrawers)
Definition: oofrepMac.cpp:411
unsigned long bodyWidth()
Definition: oofrep.h:1968
Base rendering class.
Definition: oofrep.h:816
unsigned long drawingHeight() const
Definition: oofrep.h:2707
void drawPageBreak()
Definition: oofrep1.cpp:658
const char * getTitle()
Definition: oofGrphs.cpp:164
virtual bool grey()
Definition: oofrep.h:2185
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:1047
void start()
Definition: oofadorn.h:371
const oofRepSettings * settings() const
Definition: oofrep1.cpp:469
virtual unsigned long width()
Definition: oofrep2.cpp:1017
virtual unsigned long fixedHeight()
Definition: oofrep.h:2736
oofRepPictBand_MacRender(oofRepPictBand *b)
Definition: oofrepMac.h:155
oofRepLineBand_MacRender(oofRepLineBand *b)
Definition: oofrepMac.h:142
const unsigned long * GetLineLengths(unsigned short index) const
Definition: oofdraw.cpp:1103
virtual unsigned long fixedHeight()
Definition: oofrep2.cpp:1003
bool more() const
Definition: oofrep.h:2378
oofRepGraphBand_MacRender(oofRepGraphBand *b)
Definition: oofrepMac.h:103
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:145
virtual void finishConstruction()
Definition: oofrepMac.cpp:195
oofRepPictBlock_MacRender(oofRepPictBlock *b)
Definition: oofrepMac.h:203
void changeTextStyle(oofRepTextStyle *)
Provide forwarding so report objects that are drawing can affect environment text style...
Definition: oofrep.h:2059
virtual void draw(int left, int top)=0
oofPict * picture() const
Definition: oofdraw.h:440
oofRepTextBlock * mOwner
Definition: oofreprn.h:175
void SetCurrentBlockCoords(short inX, short inY, oofRepBlock *)
Definition: oofreprn.h:244
THPrint pageSetup() const
Definition: oofrepMac.h:60
GUI report-writer layer of OOFILE database.
unsigned long count() const
Definition: oofadorn.h:392
oofRepBlockList & blocks()
Definition: oofrep.h:2718
Abstracts a drawing environment.
Definition: oofrep.h:406
Provide an iterable set of fields.
Definition: oofview.h:26
oofGraph * graph() const
Definition: oofrep.h:2672
unsigned long & currentVerticalPos()
Definition: oofrep.h:1941
void start()
Definition: oofrep.h:2371
Call oofPict::draw positioned centred within oofRepPictBlock.
Definition: oofrepMac.h:201
unsigned short bandIndenting() const
Definition: oofrep3.cpp:326
virtual void finishConstruction()
Definition: oofrep.h:820
Draw a line as filled rectangle specified by oofRepLineBand.
Definition: oofrepMac.h:140
virtual void makeRenderDispatch(oofRepDrawable *) const
Definition: oofrepMac.cpp:25
virtual void CalculateWrapping(unsigned short index, unsigned short inColWidth, bool inTruncWords=true)
Definition: oofdraw.cpp:1119
Base for specifying Macintosh GUI drawing environment.
Definition: oofrepMac.h:51
unsigned long recordNumber() const
Definition: oofview.h:223
Top level class for a report.
Definition: oofrep.h:571
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:161
unsigned long length() const
Primary test: oofStringTest::emptyStringByNullInitIsLenZero()
Definition: oofstr.h:447
unsigned long oofRepRenderT
Definition: oofrep.h:113
AdornerContextCode drawWhen()
Definition: oofadorn.h:43
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:956
bool moveDownAfter() const
Indicate if a layout band should start a new row of blocks.
Definition: oofrep.h:2215
Draw text in the current style.
Definition: oofrepMac.h:188
Abstract base for user column drawer.
Definition: oofrep.h:1239
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:1081
virtual void MakeAnyRender()
Definition: oofrep2.cpp:488
oofSizedTextArray mColHeaders
Definition: oofrepMac.h:180
virtual void makeRender(const oofRepMacEnv &)
Definition: oofadorn.cpp:167
oofRepPictBlock * mOwner
Definition: oofreprn.h:189
Draw oofRepViewBand contents as grid with page breaks.
Definition: oofrepMac.h:167
void next()
Definition: oofadorn.h:385
Abstract base for rendering an oofRepViewBand.
Definition: oofreprn.h:129
virtual void startTableBody(bool headersHaveChanged)
reset mDrawnColHeadersThisPage in case we redraw a mac render once constructed.
Definition: oofrepMac.cpp:208
virtual void finishConstruction()
Definition: oofrep2.cpp:426
virtual void drawcell(int x, int y, OOF_mixColumnarBand *drawable, unsigned long height, unsigned long width, AdornerCellCode overrunCode=startStop)
Definition: oofadorn.cpp:157
oofRepLineBand * mOwner
Definition: oofreprn.h:83
Specify a fixed height band containing an oofGraph with additional height & width.
Definition: oofrep.h:1080
unsigned int count() const
Definition: oof1.h:1498
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:122
void CalcColHeaderWrapping()
Calculate wrapped widths with Mac font rendering for all column headers.
Definition: oofrepMac.cpp:225
virtual unsigned long width()
Definition: oofrep1.cpp:1282
Portable highly capable string class.
Definition: oofstr.h:101
unsigned long fixedWidth()
Definition: oofrep.h:2229
void textStyle(oofRepTextStyle *adoptedStyle)
Set style owned by this object.
Definition: oofrep1.cpp:1804
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:110
virtual void makeRender(const oofRepMacEnv &)
Definition: oofrep1.cpp:1334
Settings object for overriding behaviours of an instance of oofRep.
Definition: oofrep.h:173
THPrint mPrintRecordH
Definition: oofrepMac.h:77
Specify a fixed-height band that contains a series of oofRepBlock's.
Definition: oofrep.h:1182
Abstract base for a fixed-size block drawn by an oofRepLayoutBand.
Definition: oofrep.h:1408
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:908
oofRepGraphBand * mOwner
Definition: oofreprn.h:45
void setStyleToMono()
Definition: oofGrphs.cpp:176
Cross-platform specification of text style.
Definition: oofrep.h:732
unsigned short colSepWidth() const
Definition: oofrep3.cpp:421
oofRepRender * mRender
Definition: oofrep.h:901
void initSizers(unsigned short numItems)
Definition: oofdraw.cpp:1074
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:153
virtual void drawPageBorder(long top, long left, long bottom, long right)
Definition: oofrepMac.cpp:75
oofAdorner * current()
Definition: oofadorn.h:407
Base object to derive adorners from.
Definition: oofadorn.h:32
void draw(int x, int y, int right, int bottom, bool onPrinter=false)
Definition: oofdraw.cpp:1370
virtual oofString copyString() const
Definition: oof3.cpp:472
unsigned long bodyEnd()
Definition: oofrep.h:1955
virtual unsigned long fixedHeight()
Definition: oofrep2.cpp:554
virtual void splitBandOverPage()
Definition: oofrep.h:426
virtual OOF_fieldTypes fieldType() const =0
unsigned short leftMargin() const
Definition: oofrep3.cpp:344
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:129
static oofRep * currentReport()
Definition: oofrep.h:2003
oofRepGraphBand_MacPrintRender(oofRepGraphBand *b)
Definition: oofrepMac.h:117
Specify a block to draw mono-styled text in an oofRepLayoutBand.
Definition: oofrep.h:1445
virtual void draw()
central default call for drawing, but still able to be overriden in extreme cases.
Definition: oofrep1.cpp:1296
void set(int left, int top, int right, int bottom)
Definition: oofRect.cpp:80
unsigned short GetNumRows(unsigned short index) const
Definition: oofdraw.cpp:1111
virtual oofString text() const
Definition: oofrep2.cpp:915
Draw colour or mono graph as specified by oofRepGraphBand.
Definition: oofrepMac.h:101
Specify a fixed height band to draw an oofPict.
Definition: oofrep.h:1649
const unsigned long * GetLineStarts(unsigned short index) const
Definition: oofdraw.cpp:1095
List of blocks in an oofRepLayoutBand.
Definition: oofrep.h:336
Specify a fixed height band to draw a horizontal line black or grey in given thickness.
Definition: oofrep.h:1143
oofRepViewBand * mOwner
Definition: oofreprn.h:147
Iterate blocks in oofRepLayoutBand changing pen position for each.
Definition: oofrepMac.h:128
bool printGraphsInMono() const
Definition: oofrep3.cpp:535
oofString & text(unsigned short index) const
Definition: oofdraw.cpp:1088
Specify a block to draw an oofPict in an oofRepLayoutBand.
Definition: oofrep.h:1516
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:939
virtual unsigned long fixedHeight()
Definition: oofrep.h:2169
virtual oofRepRender * clone(const oofRepDrawable *newOwner) const
Definition: oofrepMac.cpp:188
virtual void resumeBandOverPage()
Definition: oofrep.h:427
Specify a band which provides a vertical gap on the page.
Definition: oofrep.h:1050
Advance report vertical position.
Definition: oofrepMac.h:88
virtual unsigned long calcNextDrawHeight(unsigned long heightAvailable, unsigned long &heightUsed)=0
Cross-platform picture representation can load from file or resource and draw.
Definition: oofdraw.h:201
static oofColSizer::colAlignT naturalAlignmentForField(OOF_fieldTypes)
Definition: oofsize.cpp:249
oofString getHeading(unsigned int, bool *tellIfOverride=0) const
Definition: oofview.cpp:278