OOFILE  1.9
oofrep.h
Go to the documentation of this file.
1 #ifndef H_OOFREP
2 #define H_OOFREP
3 // COPYRIGHT 1996 A.D. Software, All rights reserved
4 
29 #define OOFVERS_REP 0x01500a01 // Version 1.5.0 a1
30 /* index to version defines
31 Note that you will may lack some files depending on your package
32 
33 file: VERSION IDENTIFIER
34 ==== ==================
35 oof0.h OOFVERS_CORE core version
36 oofrep.h OOFVERS_REP report writer
37 oofGrphs.h OOFVERS_GRAPH graphing engine
38 oofgui.h OOFVERS_GUI generic GUI classes used by PP, MFC and other framework integrations
39 oofpp.h OOFVERS_PP PowerPlant framework (Metrowerks CodeWarrior, on Mac)
40 oofmfc.h OOFVERS_MFC MFC GUI framework
41 
42 */
43 
75 #ifndef H_OOF2
76  #include "oof2.h"
77 #endif
78 #ifndef H_OOFVIEW
79  #include "oofview.h"
80 #endif
81 #ifndef H_OOFADORN
82  #include "oofadorn.h"
83 #endif
84 #ifndef H_OOFCOLOR
85  #include "oofcolor.h"
86 #endif
87 #ifndef H_OOFRECT
88  #include "oofRect.h"
89 #endif
90 #ifndef H_OOFDRAW
91  #include "oofdraw.h"
92 #endif
93 #ifndef H_OOFSIZE
94  #include "oofsize.h"
95 #endif
96 
97 #ifndef H_OOFXMLDB
98  #include "oofxmldb.h"
99 #endif
100 
101 #ifndef _H_OOFREPFWD
102  #include "oofrepFwd.h"
103 #endif
104 
112 #ifndef OOF_REP_NO_GUI
114 #endif
115 
116 typedef unsigned long oofRepRenderT;
117 
118 int twips( int pixels );
119 
127 #if defined(_Windows) && !defined(OOF_MacStyleEnums)
128 #define OOF_MacStyleEnums
129 
133 enum OOF_MacStyleEnumT {
134  normal = 0x00,
135  bold = 0x01,
136  italic = 0x02,
137  underline = 0x04,
138  outline = 0x08,
139  shadow = 0x10,
140  condense = 0x20,
141  extend = 0x40
142 };
143 #endif
144 
151 public:
152  virtual oofRepXMLsettings* clone();
153 
154  virtual oofRepXMLEnv* makeXMLenv(std::ostream&); // yes, you can actually subclass the env!
155  virtual oofRepXMLEnv* makeXMLenv(const char* fileName); // another factory to override
156 
157  virtual dbConnect* makeTempConnection(); // choose type of backend
158  virtual void createTempConnectFiles(dbConnect*); // chooses name and where to store
159 
160 // methods controlling Save As dialog and file types
161  virtual oofString saveReportDocDescription();
162  virtual oofString saveReportDocFileExt(); // eg: ".XML"
163  virtual unsigned long saveReportDocMacFileType(); // eg: 'TEXT'
164 };
165 
166 
174 public:
175  oofRepSettings();
177  ~oofRepSettings();
178 
179  unsigned short lineThickness() const;
180  void lineThickness(unsigned short);
181 
182  unsigned short pageHeight() const;
183  void pageHeight(unsigned short);
184 
185  unsigned short pageWidth() const;
186  void pageWidth(unsigned short);
187 
188  unsigned short borderType() const;
189  void borderType(unsigned short);
190 
191  unsigned short bandIndenting() const;
192  void bandIndenting(unsigned short);
193 
194  unsigned short leftMargin() const;
195  void leftMargin(unsigned short);
196 
197  unsigned short rightMargin() const;
198  void rightMargin(unsigned short);
199 
200  unsigned short topMargin() const;
201  void topMargin(unsigned short);
202 
203  unsigned short bottomMargin() const;
204  void bottomMargin(unsigned short);
205 
206  unsigned short colSepWidth() const;
207  void colSepWidth(unsigned short);
208 
209  unsigned short blockVertSep() const;
210  void blockVertSep(unsigned short);
211 
212  oofRepTextStyle* defaultTextStyle() const;
213  void defaultTextStyle(oofRepTextStyle* adoptedStyle);
214 
215  oofRepBandList& defaultPageHeaders() const;
216  void defaultPageHeaders(oofRepBandList*);
217 
218  oofRepBandList& defaultPageFooters() const;
219  void defaultPageFooters(oofRepBandList*);
220 
221  unsigned short drawHeadingsDownToLevel() const;
222  void drawHeadingsDownToLevel(unsigned short); // 1 is first visible band, 0 disables
223 
224  bool printGraphsInMono() const;
225  void printGraphsInMono(bool);
226 
227  bool modalPreviewWindow() const;
228  void modalPreviewWindow(bool);
229 
230  unsigned short graphBandMinSizePercent() const;
231  void graphBandMinSizePercent(unsigned short);
232 
233  oofRepXMLsettings* XMLsettings() const;
234  void XMLsettings(oofRepXMLsettings*);
235 
236  oofRepEditor* reportEditor() const;
237  void reportEditor(oofRepEditor*);
238 
239  unsigned short& refcount();
240  void describe(std::ostream& );
241 private:
242 // *** WARNING *****
243 // if you add any settings, remember to update oofRepDefaultSettings ctor
244 // as well as our ctor, copy ctor & dtor
245 
246 // all pointers below here are owned
247  unsigned short* mLineThickness;
248  unsigned short* mPageHeight;
249  unsigned short* mPageWidth;
250  unsigned short* mBorderType;
251  unsigned short* mBandIndenting;
252  unsigned short* mLeftMargin;
253  unsigned short* mRightMargin;
254  unsigned short* mTopMargin;
255  unsigned short* mBottomMargin;
256  unsigned short* mColSepWidth;
257  unsigned short* mBlockVertSep;
258  oofRepTextStyle* mDefaultTextStyle;
259  unsigned short mRefCount;
260  oofRepBandList* mDefaultPageHeaders; // NOT exported to XML as part of settings, already copied in <layout>
261  oofRepBandList* mDefaultPageFooters; // NOT exported to XML as part of settings, already copied in <layout>
262  unsigned short* mDrawHeadingsDownToLevel;
263  bool* mPrintGraphsInMono;
264  bool* mModalPreviewWindow;
265  unsigned short* mGraphBandMinSizePercent;
266  oofRepXMLsettings* mXMLsettings; // NOT exported to XML - application will use globally only
267  oofRepEditor* mRepEditor; // NOT exported to XML - application will use globally only
268 };
269 
270 
277 public:
280  static oofRepSettings * settings();
281 
282 private:
283  static oofRepSettings * sDefaultSettings;
284  static oofRepDefaultSettings sDefaultSettingsFactory; // the Singleton
285 };
286 
287 
293 public:
294  enum keepTogetherT {eDefaultTogether, eKeepTogether, eAllowSplit};
295 
296  oofRepBandList(keepTogetherT keepTogether=eDefaultTogether);
298  const oofRepBandList& operator=(const oofRepBandList&);
299  ~oofRepBandList();
300  oofRepBandList* clone();
301 
302  unsigned long minHeight() const;
303  bool keepTogether() const;
304  void keepTogether(bool); // must call before report runs
305 
306  void start();
307  bool more() const;
308  void next();
309  void deleteItem(unsigned long index);
310  unsigned long count() const;
311  oofRepBand* operator()();
312  oofRepBand* operator[](unsigned long index);
313  oofRepBand* current();
314  oofRepBand* value(unsigned long) const;
315  void append(oofRepBand* adoptedBand);
316  oofRepBandList& operator<<(oofRepBand* adoptedBand);
317  oofRepBandList& operator<<(const oofRepBand& prototypeBand);
318  unsigned long fixedHeight();
319  void finishConstruction();
320  void describe(std::ostream& os);
321 
322 
323 
324 private:
325 // data storage
326  OOF_ExpandableLongArray mBands;
327  keepTogetherT mKeepTogether;
328  unsigned long mFixedHeight, mMinHeight; // calc in finishConstruction
329 };
330 
331 
337 public:
338  oofRepBlockList();
340  const oofRepBlockList& operator=(const oofRepBlockList&);
341  ~oofRepBlockList();
342  oofRepBlockList* clone();
343 
344  void start();
345  bool more() const;
346  void next();
347  unsigned long count() const;
348  oofRepBlock* operator()();
349  oofRepBlock* operator[](unsigned long index);
350  oofRepBlock* current();
351  oofRepBlock* value(unsigned long) const;
352  void append(oofRepBlock* adoptedBlock);
353  oofRepBlockList& operator<<(oofRepBlock* adoptedBlock);
354  unsigned long fixedHeight();
355  void describe(std::ostream&);
356 
357 
358 private:
359 // data storage
360  OOF_ExpandableLongArray mBlocks;
361 };
362 
363 
369 public:
370  oofRepBreakList(bool ownsBreaks=true);
372  const oofRepBreakList& operator=(const oofRepBreakList&);
373  ~oofRepBreakList();
374  oofRepBreakList* clone();
375 
376  void start();
377  bool more() const;
378  void next();
379  unsigned long count() const;
380  oofRepBreak* operator()();
381  oofRepBreak* operator[](unsigned long index);
382  oofRepBreak* current();
383  oofRepBreak* value(unsigned long) const;
384  void append(oofRepBreak* adoptedBreak);
385  oofRepBreakList& operator<<(oofRepBreak* adoptedBreak);
386 
387 
388 
389 private:
390 // data storage
391  OOF_ExpandableLongArray mBreaks;
392  bool mOwnsBreaks;
393 };
394 
395 
407 public:
408  virtual ~oofRepEnvironment() {};
409  virtual void changeTextStyle(oofRepTextStyle*)=0;
410  virtual unsigned short heightOfTextStyle(oofRepTextStyle*)=0;
411  virtual void drawPageBreak()=0;
412  virtual void drawSectionBreak();
413  virtual void startSection(); // in case we need to know, like startEnvironment
414 
415  virtual unsigned long calcPageHeight()=0;
416  virtual unsigned long calcPageWidth()=0;
417  virtual bool canDraw();
418  virtual bool isPrintingEnvironment() const;
419 
420  virtual void makeRender() {}; // in case anyone needs to do things when making them
421  virtual void startEnvironment();
422  virtual void endEnvironment();
423  virtual bool preprocessesPageHeadersAndFooters() const;
424 
425  virtual void drawPageBorder( long top, long left, long bottom, long right );
426  virtual void splitBandOverPage() {};
427  virtual void resumeBandOverPage() {};
428 
429 
430 // multi-method dispatch to factories for rendering report objects
431  virtual void makeRenderDispatch(oofRepDrawable*) const=0;
432  virtual void makeRenderDispatch(oofAdorner*) const=0;
433 
434  virtual oofRepRenderT renderType() const=0;
435 };
436 
437 
447 public:
448 
449  oofRepStreamEnv();
450  oofRepStreamEnv(std::ostream&);
451  oofRepStreamEnv(const char* fileName, bool openBinary=false);
452  virtual ~oofRepStreamEnv();
453 
454  virtual bool canDraw();
455 
456 protected:
457  std::ostream* mOut; // maybe owned
458  std::ofstream* mOwnedofstream; // maybe owned, copy of mOut as different class
459 
460 public:
461  static std::ostream& out();
462  static std::ostream* sOut;
463 };
464 
465 
466 class oofRep;
467 class oofRepBandList;
468 class oofRepBreakList;
469 class oofRepBand;
470 class oofAdornerList;
471 class oofAdorner;
472 class oofRepLayoutBand;
473 class oofRepBlock;
474 class oofRepDrawable;
475 class oofAdornerList;
476 class oofAdorner;
477 
485 public:
487  mRep(0) // ensure they call visit(aRep)
488  {};
489  virtual ~oofRepVisitor();
490 
491  virtual void visit(oofRep*);
492 
493 protected:
503 
505  virtual void VisitFirstPageHeaders(oofRepBandList&);
506  virtual void VisitFirstPageFooters(oofRepBandList&);
507  virtual void VisitPageHeaders(oofRepBandList&);
508  virtual void VisitPageFooters(oofRepBandList&);
509  virtual void VisitBody(oofRepBand*);
510  virtual void VisitIterableBandBody(oofRepBand*);
511  virtual void VisitBandHeaders(oofRepBandList&);
512  virtual void VisitBandFooters(oofRepBandList&);
513  virtual void VisitBandHeaderBreaks(oofRepBreakList&);
514  virtual void VisitBandFooterBreaks(oofRepBreakList&);
516 
518 
519  virtual void VisitBandList(oofRepBandList&);
520  virtual void VisitBreakList(oofRepBreakList&);
521  virtual void VisitBlockList(oofRepBlockList&);
522  virtual void VisitComplexBand(oofRepBand*); // does all the headers, footers etc.
523  virtual void VisitLayoutBand(oofRepLayoutBand*);
524  virtual void VisitBlock(oofRepBlock*);
525  virtual void VisitBand(oofRepBand*);
526  virtual void VisitDrawable(oofRepDrawable*); // ultimate base called by default VisitBand, VisitBlock
528 
530 
531  virtual void VisitAdornerList(oofAdornerList&);
532  virtual void VisitAdorner(oofAdorner*);
534 
536 
537  virtual void EnterLevel();
538  virtual void LeaveLevel();
540 
542 // utilities
543  void VisitTypedBand(oofRepBand*);
544 
545 // data storage
547 };
548 
549 
556 protected:
557  virtual void VisitDrawable(oofRepDrawable*);
558 
559  // define our own pure virtual
560  virtual void VisitView(dbView*)=0;
561 };
562 
563 
564 
572 public:
573  oofRep(dbTable* inTableForDefaultBody, unsigned long startingPageNumber=1);
574  oofRep(dbView* adoptedViewForDefaultBody, unsigned long startingPageNumber=1);
575  oofRep(const dbView& inViewForDefaultBody, unsigned long startingPageNumber=1);
576  oofRep(oofRepIterableTreeBand* adoptedBody=0, unsigned long startingPageNumber=1);
577  oofRep(const oofRep&);
578  virtual ~oofRep();
579 
580  virtual bool isMultiReport() const;
581  unsigned short nestedViewLevel() const;
582  enum { kBodyViewLevel=1 }; // base value for comparing against nestedViewLevel()
583 
584  oofRepBandList& firstPageHeaders();
585  oofRepBandList& firstPageFooters();
586 
587  oofRepBandList& pageHeaders();
588  oofRepBandList& pageFooters();
589 
590  virtual void draw(oofRepEnvironment&);
591 
592  void drawFirstPageHeaders();
593  void drawFirstPageFooters();
594 
595  void drawPageHeaders();
596  void drawPageFooters();
597 
598  void resetIteratingBandLevel();
599  void incrementIteratingBandLevel();
600  void decrementIteratingBandLevel();
601 
602  void drawPageBreak();
603  const oofRepSettings* settings() const;
604  oofRepSettings* getLocalSettings();
605  void changeTextStyle(oofRepTextStyle*);
606  oofRepEnvironment* environment() const;
607  void restoreEnvironment(oofRepEnvironment*);
608  unsigned long& currentVerticalPos();
609  unsigned long bodyStart();
610  unsigned long bodyEnd();
611  unsigned long bodyHeight();
612  unsigned long bodyWidth();
613 
614  unsigned long pageWidth();
615  unsigned long pageHeight();
616 
617  virtual bool shouldDrawViewColumnHeaders() const;
618  bool reportAllowsEditing() const;
619 
621  oofRepIterableTreeBand* useEmptyBody();
622  oofRepIterableTreeBand* body();
623 
624  void pageNumber(unsigned long);
625  unsigned long pageNumber() const;
626  unsigned long startingPageNumber() const;
627  void startingPageNumber(unsigned long);
628 
629  static oofRepSettings* defaultSettings();
630  static oofRep* currentReport();
631 
632  void becomeCurrent();
633 
634  void describe(std::ostream&);
635 
636 protected:
637  void DrawComplexBand(oofRepBand*);
638  void DrawBandList(oofRepBandList&, bool inBody=true);
639  void ProcessBreakList(oofRepBreakList& inList, bool beforeRecord);
640  void DrawBreakList(oofRepBreakList& inList);
641 
642 // data storage
643 
651  unsigned long mFirstPageHeaderHeight, mFirstPageFooterHeight, mPageHeaderHeight,
652  mPageFooterHeight, mPageHeight, mHeadersStartAt, mFootersStartAt,
653  mVerticalPos, mBodyStart, /*mBodyEnd,*/ mBodyWidth, mPageWidth,
654  mFirstPageBodyStart, mFirstPageFootersStartAt/*, mFirstPageBodyEnd*/;
658  unsigned long mPageNumber;
661  unsigned short mNestedIteratingBandLevel;
663  unsigned long mStartingPageNumber;
664  unsigned short* mReferences;
665 
667 };
668 
669 
670 class oofRepSection; // forward
671 
678 public:
679  oofRepMulti();
680 // use default copy ctor
681  virtual ~oofRepMulti();
682 
683  virtual void draw(oofRepEnvironment&);
684  virtual bool isMultiReport() const;
685 
686  void appendReport(oofRep* adoptedReport);
687  void appendReport(const oofRep&);
688  oofRepMulti& operator<<(oofRep* adoptedReport);
689  oofRepMulti& operator<<(const oofRep&);
690 
691  oofRepSection* section(unsigned long) const;
692  oofRepSection* orphanSection(unsigned long);
693 
694  unsigned long count() const;
695 
696 protected:
698 
699 friend class oofRepSection; // allow access to parent attributes
700 };
701 
702 
708 public:
709  oofRepSection(oofRepIterableTreeBand* adoptedBody=0, unsigned long startingPageNumber=1, bool resetPageNumber=true, bool pageBreak=true);
710 // use default copy ctor
711  oofRepSection(const oofRep&, bool resetPageNumber=true, bool pageBreak=true); // special copy ctor
712 
713  void drawSection(oofRepEnvironment&, oofRepMulti* parentReport, unsigned short inSectionNumber);
714 
715 
716  void setDimensions(oofRepEnvironment&, oofRepMulti* parentReport);
717 
718 
719 protected:
720  bool mResetPageNumber, mPageBreak;
721 };
722 
723 
733 public:
734  oofRepTextStyle();
735  oofRepTextStyle(const char* fontName, unsigned short fontSize, unsigned char styleNum=0, short leading=0, oofColor color=oofColor::Black,oofColSizer::colAlignT Alin = oofColSizer::alignLeft);
736  oofRepTextStyle(const char* fontName, unsigned short fontSize,oofColSizer::colAlignT Alin, unsigned char styleNum=0, short leading=0, oofColor color=oofColor::Black );
737  // uses default copy ctor
738  virtual ~oofRepTextStyle() {};
739 
740  void finishConstruction();
741  bool invariant() const;
742 
743 #ifdef _Windows
744 // oofRepTextStyle(const LOGFONT& lf);
745 #endif
746 // use default copy ctor
747  virtual oofRepTextStyle* clone() const;
748  bool operator==(const oofRepTextStyle&) const;
749 
750  // getters
751  const oofString& fontName() const;
752  unsigned short fontSize() const;
753  unsigned char fontStyle() const;
754  short leading() const;
755  const oofColor& color() const;
756  oofColSizer::colAlignT alignment() const;
757  // setters
758  void fontName(const oofString&);
759  void fontSize(unsigned short);
760  void fontStyle(unsigned char);
761  void leading(short);
762  void color(const oofColor&);
763  void alignment(oofColSizer::colAlignT) ;
764 
765  unsigned long fixedHeight();
766  void extract(std::ostream&) const;
767 
768 #ifdef _Windows
769  const LOGFONT& getLogFont() const;
770 #endif
771 
772 private:
773 // data storage
774 #ifdef _Windows
775  LOGFONT mLogFont;
776 #endif
777  oofString mFontName;
778  unsigned short mFontSize;
779  unsigned char mStyleNum;
780  short mLeading;
781  oofColor mColor;
782  oofColSizer::colAlignT mAlignment;
783 };
784 
785 
791 public:
792  oofRepTextStylable(const char* fontName, unsigned short fontSize, unsigned char styleNum=0, short leading=0, oofColor color=oofColor::Black);
793  oofRepTextStylable(oofRepTextStyle* adoptedStyle=0);
795  virtual ~oofRepTextStylable();
796 
797  oofRepTextStyle* localTextStyle() const;
798  oofRepTextStyle* uniqueTextStyle();
799  void textStyle(oofRepTextStyle* adoptedStyle);
800  void textStyle(const char* fontName, unsigned short fontSize, unsigned char styleNum=0, short leading=0, oofColor color=oofColor::Black);
801  virtual oofRepTextStyle* textStyle() const;
802 
803 protected:
804 // data storage
806 };
807 
808 
817 public:
818  virtual oofRepRender* clone(const oofRepDrawable* newOwner) const=0;
819  virtual ~oofRepRender() {};
820  virtual void finishConstruction() {};
821  virtual void draw() {};
822  virtual void describeLayout() {};
823 
824  virtual long leftDrawMargin() const;
825  virtual unsigned long width() const;
826 };
827 
828 
835 private:
836  oofRepRenderDecorator(const oofRepRenderDecorator&) { assert(0); }; // use clone()
837 
838 public:
839  oofRepRenderDecorator(oofRepRender* adoptedRealRender=0);
840  virtual ~oofRepRenderDecorator();
841  void adoptRender(oofRepRender* adoptedRealRender);
842 
843 // methods forwarded
844  virtual void finishConstruction();
845  virtual void draw();
846  virtual void describeLayout();
847  virtual long leftDrawMargin() const;
848  virtual unsigned long width() const;
849 
850 protected:
852 };
853 
854 
861 public:
862  oofRepDrawable(oofRepTextStyle* adoptedStyle=0);
863  oofRepDrawable(const oofRepDrawable& rhs);
864  virtual ~oofRepDrawable();
865  virtual void finishConstruction();
866 
867  virtual void draw();
868  virtual void describeLayout();
869  virtual dbView* view(unsigned short whichView=0) const; // lots of drawables may be able to show a dbView
870 
871  virtual unsigned long fixedHeight(); // placed in base class for adorner call
872  virtual unsigned long width();
873 
880  virtual void makeRender(const oofRepMacEnv&);
881  virtual void makeRender(const oofRepMacCGEnv&);
882  virtual void makeRender(const oofRepWinEnv&);
883  virtual void makeRender(const oofRepTextEnv&);
884  virtual void makeRender(const oofRepGDIPlusEnv&);
885  virtual void makeRender(const oofRepRTFEnv&);
886  virtual void makeRender(const oofRepHTMLEnv&);
887  virtual void makeRender(const oofRepCSVEnv&);
888  virtual void makeRender(const oofRepTSVEnv&);
889  virtual void makeRender(const oofRepXMLEnv&);
890 
891 #ifndef OOF_REP_NO_GUI
892  virtual void makeRender(const oofRepEditingEnv&);
894  virtual oofRepEditLink* makeEditLink(const oofRepEditingEnv&);
895 #endif
896  oofString ID() const;
897  void ID(const oofString&);
898  void clearID();
899 
900 protected:
902  oofString mID; // up to environment if this is used or not, and may not use for all drawables at a time!
903 };
904 
905 
919 public:
920  oofRepBreakList& headerBreaks();
921  oofRepBreakList& footerBreaks();
922 
924 
925  virtual void start() {}
926  virtual bool more()=0;
927  virtual void next()=0;
929 
930 protected:
933 
934 };
935 
936 
945 public:
946  oofRepBandList& headers();
947  oofRepBandList& footers();
948 
949 protected:
952 };
953 
954 
964 public:
965  virtual void startTableWrapper();
966  virtual void startTableBody();
967  virtual void endTableBody();
968  virtual void endTableWrapper();
969 };
970 
971 
972 
981 public:
983  virtual ~OOF_mixColumnarBand();
985 
986  virtual oofRepDrawable* drawableContainingColumns()=0;
987 
988 
990 
991  oofRepCustomViewDrawer* customDrawer(unsigned short col);
992  void customDrawer(unsigned short col, oofRepCustomViewDrawer* adoptedDrawer);
993  bool hasCustomViewDrawers() const;
995 
996 
998 
999  bool fieldIsNonEditable(unsigned short col) const;
1000  void setFieldNonEditable(unsigned short col);
1002 
1003 
1005 
1006  virtual int numCols() const=0;
1007  virtual bool lastRow( unsigned long row )=0;
1008  virtual bool lastCol( unsigned long col )=0;
1010 
1011 protected:
1014 };
1015 
1016 
1017 
1027 public:
1028  virtual ~oofRepBand() {};
1029  virtual oofRepBand* clone() const=0;
1030  virtual unsigned long fixedHeight();
1031  virtual unsigned long minHeight();
1032  virtual bool maybeComplexBand() const;
1033  virtual bool isLayoutBand() const; // layout band may be subclassed in future, to be a different layout
1034  virtual void drawSquished(long& balanceToSave);
1035 
1037 
1038  virtual OOF_mixIterableBand* asIterableBand();
1039  virtual OOF_mixBandWithSubBands* asBandWithSubBands();
1040  virtual OOF_mixBandWithTableWrappers* asBandWithTableWrappers();
1041  virtual OOF_mixColumnarBand* asColumnarBand();
1043 };
1044 
1045 
1051 public:
1052  oofRepSpaceBand(unsigned long heightToSkip);
1053 // use default copy ctor
1054  virtual ~oofRepSpaceBand() {};
1055  virtual oofRepBand* clone() const;
1056  virtual unsigned long fixedHeight();
1057 
1058 // multi-method dispatch to factories for rendering report objects
1059  virtual void makeRender(const oofRepMacEnv& env);
1060  virtual void makeRender(const oofRepMacCGEnv& env);
1061  virtual void makeRender(const oofRepWinEnv& env);
1062  virtual void makeRender(const oofRepGDIPlusEnv& env);
1063  virtual void makeRender(const oofRepTextEnv& env);
1064  virtual void makeRender(const oofRepRTFEnv& env);
1065  virtual void makeRender(const oofRepHTMLEnv& env);
1066  virtual void makeRender(const oofRepCSVEnv& env);
1067  virtual void makeRender(const oofRepTSVEnv& env);
1068  virtual void makeRender(const oofRepXMLEnv& env);//dg 22/2/99
1069 
1070 private:
1071 // data storage
1072  unsigned long mHeight;
1073 };
1074 
1075 
1081 public:
1082  oofRepGraphBand(oofGraph*, unsigned long height,
1083  unsigned long grHgt=400, unsigned long grWid=400, const char* inGraphTitle=0);
1084  oofRepGraphBand(const oofRepGraphBand& rhs);
1085  virtual ~oofRepGraphBand();
1086  virtual void finishConstruction();
1087  virtual oofRepBand* clone() const;
1088 
1089  virtual void drawSquished(long& balanceToSave);
1090  virtual void draw();
1091  virtual dbView* view(unsigned short whichView=0) const;
1092 
1093 // getters
1094  virtual unsigned long fixedHeight();
1095  virtual unsigned long minHeight();
1096  oofGraph* graph() const;
1097  unsigned long graphWidth() const;
1098  unsigned long graphHeight() const;
1099  unsigned long originalGraphWidth() const;
1100  unsigned long originalGraphHeight() const;
1101  unsigned long drawingHeight() const;
1102  unsigned long numOverlaid() const;
1103 
1104 // setters
1105  void fixedHeight( unsigned long height ) { mHeight = height; } //lint !e1411 isn't hiding original
1106  void graphWidth( unsigned long grWidth );
1107  void graphHeight( unsigned long grHeight );
1108 
1109 
1110 // multi-method dispatch to factories for rendering report objects
1111  virtual void makeRender(const oofRepMacEnv&);
1112  virtual void makeRender(const oofRepMacCGEnv& env);
1113  virtual void makeRender(const oofRepWinEnv& env);
1114  virtual void makeRender(const oofRepGDIPlusEnv& env);
1115  virtual void makeRender(const oofRepTextEnv& env);
1116  virtual void makeRender(const oofRepRTFEnv& env);
1117  virtual void makeRender(const oofRepHTMLEnv& env);
1118  virtual void makeRender(const oofRepCSVEnv& env);
1119  virtual void makeRender(const oofRepTSVEnv& env);
1120  virtual void makeRender(const oofRepXMLEnv& env);//dg 22/2/99
1121 
1122 private:
1123  void AdjustGraphToBandHeight(unsigned long inHeight);
1124  void RestoreDimensions();
1125 
1126 // data storage
1127  unsigned long mHeight; // public fixedHeight() same as other bands
1128  oofGraph* mGraphPtr; // owned
1129  unsigned long mGrHgt;
1130  unsigned long mGrWid;
1131  unsigned long mMinHeight; // min size we will scale down to normally
1132  unsigned short mMinSizePercent;
1133  unsigned long mDrawingHeight; // scaled drawing height
1134  unsigned long mSavedGrHgt, mSavedGrWid; // saved values whilst scaled
1135  enum {kUseDefaultScalePercent=0};
1136 };
1137 
1138 
1144 public:
1145  oofRepLineBand(unsigned long heightInPoints=2, bool isGrey=true);
1146 // use default copy ctor
1147  virtual ~oofRepLineBand() {};
1148  virtual oofRepBand* clone() const;
1149  virtual unsigned long fixedHeight();
1150  virtual bool grey();
1151 
1152 // multi-method dispatch to factories for rendering report objects
1153  virtual void makeRender(const oofRepMacEnv& env);
1154  virtual void makeRender(const oofRepMacCGEnv& env);
1155  virtual void makeRender(const oofRepWinEnv& env);
1156  virtual void makeRender(const oofRepGDIPlusEnv& env);
1157  virtual void makeRender(const oofRepTextEnv& env);
1158  virtual void makeRender(const oofRepRTFEnv& env);
1159  virtual void makeRender(const oofRepHTMLEnv& env);
1160  virtual void makeRender(const oofRepCSVEnv& env);
1161  virtual void makeRender(const oofRepTSVEnv& env);
1162  virtual void makeRender(const oofRepXMLEnv& env); //dg 22/2/99
1163 
1164 private:
1165 // data storage
1166  unsigned long mHeight;
1167  bool mGrey;
1168 };
1169 
1170 
1183 public:
1184  oofRepLayoutBand();
1185 // use default copy ctor
1186  virtual ~oofRepLayoutBand() {};
1187  virtual oofRepBand* clone() const;
1188  virtual bool isLayoutBand() const; // layout band may be subclassed in future, to be a different layout
1189  virtual void draw();
1190  virtual unsigned long fixedHeight();
1191 
1192 // getters
1193  oofRepBlockList& blocks();
1194 
1195  static oofRepLayoutBand* currentLayout();
1196 
1199  oofRepLayoutBand& operator<<(const char*);
1200  oofRepLayoutBand& operator<<(oofRepBlock* adoptedBlock);
1201  oofRepLayoutBand& operator<<(const oofRepBlock& copiedBlock);
1202 
1203 // multi-method dispatch to factories for rendering report objects
1204  virtual void makeRender(const oofRepMacEnv& env);
1205  virtual void makeRender(const oofRepMacCGEnv& env);
1206  virtual void makeRender(const oofRepWinEnv& env);
1207  virtual void makeRender(const oofRepGDIPlusEnv& env);
1208  virtual void makeRender(const oofRepTextEnv& env);
1209  virtual void makeRender(const oofRepRTFEnv& env);
1210  virtual void makeRender(const oofRepHTMLEnv& env);
1211  virtual void makeRender(const oofRepCSVEnv& env);
1212  virtual void makeRender(const oofRepTSVEnv& env);
1213  virtual void makeRender(const oofRepXMLEnv& env);
1214 #ifndef OOF_REP_NO_GUI
1215  virtual void makeRender(const oofRepEditingEnv& env);
1216 #endif
1217 private:
1218  void BecomeCurrent();
1219 
1220 // data storage
1221  oofRepBlockList mBlocks;
1222  bool mCalcHeight;
1223  unsigned long mFixedHeight; // cache the value
1224  static oofRepLayoutBand* sCurrentLayout;
1225 };
1226 
1227 
1228 class oofDE;
1229 
1240 public:
1241  virtual void draw(int left, int top)=0;
1242  virtual void calculateWrapping(const dbField*, unsigned long sizedWidth, unsigned long& wrappedHeight)=0;
1243  virtual unsigned long calcNextDrawHeight(unsigned long heightAvailable, unsigned long& heightUsed)=0; // returns heightLeftToDraw
1244  virtual oofString plainText(const dbField*);
1245 #ifdef _Windows
1246  virtual oofDE* makeDrawDE(int left, int top)=0; // create your own oofDE to record the drawing state, instead of calling draw
1247 #endif
1248 };
1249 
1250 
1258 {
1259 public:
1260  oofRepIterableTreeBand(int inMaxIterations=1);
1263  virtual bool maybeComplexBand() const;
1264 
1265 
1267 
1268  virtual void start();
1269  virtual bool more();
1270  virtual void next();
1272 
1273 protected:
1276 };
1277 
1278 
1285 {
1286 public:
1287  oofRepViewBand(const dbView&, bool isBoxed=false);
1288  oofRepViewBand(dbView* adoptedView=0, bool isBoxed=false);
1290  virtual ~oofRepViewBand();
1291  virtual oofRepBand* clone() const;
1292 
1294 
1295  virtual void start();
1296  virtual bool more();
1297  virtual void next();
1299 
1300 
1302 
1303  virtual void startTableWrapper();
1304  virtual void startTableBody();
1305  virtual void endTableBody();
1306  virtual void endTableWrapper();
1308 
1309 
1311 
1314 
1315  virtual bool lastRow( unsigned long row );
1316  virtual bool lastCol( unsigned long col );
1317  virtual int numCols() const;
1319 
1320 
1323 
1324  virtual dbView* view(unsigned short whichView=0) const;
1325 
1326  virtual void draw();
1327 
1328  bool isBoxed() const;
1329 
1330 
1331  void drawColumnHeaders();
1332  void dirtyColHeaders();
1333 
1334  void setBoxed();
1335 
1337 
1338  virtual void makeRender(const oofRepMacEnv& env);
1339  virtual void makeRender(const oofRepMacCGEnv& env);
1340  virtual void makeRender(const oofRepWinEnv& env);
1341  virtual void makeRender(const oofRepGDIPlusEnv& env);
1342  virtual void makeRender(const oofRepTextEnv& env);
1343  virtual void makeRender(const oofRepRTFEnv& env);
1344  virtual void makeRender(const oofRepHTMLEnv& env);
1345  virtual void makeRender(const oofRepCSVEnv& env);
1346  virtual void makeRender(const oofRepTSVEnv& env);
1347  virtual void makeRender(const oofRepXMLEnv& env);
1348 #ifndef OOF_REP_NO_GUI
1349 
1350  virtual void makeRender(const oofRepEditingEnv&);
1351 
1352  virtual oofRepEditLink* makeEditLink(const oofRepEditingEnv&);
1353 #endif
1354 
1355 
1356 private:
1357  void FinishConstruction();
1358 // data storage
1359  dbView* mView;
1360  bool mIsBoxed;
1361  OOF_mixViewExtraRender* mTableExtraRender;
1362  bool mColHeadersNeedCalc;
1363 }; // oofRepViewBand
1364 
1365 
1366 
1372 {
1373 public:
1374  oofRepEmptyRootBand(int numIterations=1);
1375  virtual oofRepBand* clone() const;
1376 
1377  virtual void draw();
1378 
1379 
1381 
1382  virtual void makeRender(const oofRepMacEnv& env);
1383  virtual void makeRender(const oofRepMacCGEnv& env);
1384  virtual void makeRender(const oofRepWinEnv& env);
1385  virtual void makeRender(const oofRepGDIPlusEnv& env);
1386  virtual void makeRender(const oofRepTextEnv& env);
1387  virtual void makeRender(const oofRepRTFEnv& env);
1388  virtual void makeRender(const oofRepHTMLEnv& env);
1389  virtual void makeRender(const oofRepCSVEnv& env);
1390  virtual void makeRender(const oofRepTSVEnv& env);
1391  virtual void makeRender(const oofRepXMLEnv& env);
1392 #ifndef OOF_REP_NO_GUI
1393  virtual void makeRender(const oofRepEditingEnv&);
1394 #endif
1395 
1396 
1397 protected:
1398  virtual void MakeAnyRender();
1399 
1400 }; // oofRepEmptyRootBand
1401 
1402 
1403 
1409 public:
1410  enum blockAlignT { alignLeft, alignCentre, alignRight};
1411 
1412  oofRepBlock(oofRepTextStyle* adoptedStyle=0);
1413  // use default copy ctor, op=
1414  virtual ~oofRepBlock() {};
1415 
1416  virtual oofRepBlock* clone() const=0;
1417  virtual oofRepTextStyle* textStyle() const;
1418 
1419  blockAlignT align() const;
1420  oofRepBlock& align(blockAlignT);
1421 
1422  bool moveDownAfter() const;
1423  oofRepBlock& moveDownAfter(bool);
1424  virtual unsigned long fixedHeight();
1425  unsigned long fixedWidth();
1426  oofRepBlock& fixedWidth(unsigned long);
1427 
1428  // interface for iterating and editing text pieces as if they were cells in array
1429  virtual unsigned int countCells() const;
1430  virtual oofString getCellText(bool* outIsEditable=0, oofString* outLocationName=0, long row=0, short col=0) const;
1431  virtual void setCellText(const oofString&, long row=0, short col=0);
1432 
1433 protected:
1434 // data storage
1435  unsigned long mFixedWidth;
1438 };
1439 
1440 
1446 public:
1447  oofRepTextBlock(const char* str=0, oofRepTextStyle* adoptedStyle=0);
1448  oofRepTextBlock(const oofString&, oofRepTextStyle& copiedStyle);
1449  oofRepTextBlock(const oofString&, oofRepTextStyle* adoptedStyle=0);
1450 // oofRepTextBlock(std::ostream&, oofRepTextStyle* adoptedStyle=0); // allow complex string construction
1451 // use default copy ctor
1452  virtual ~oofRepTextBlock() {};
1453  virtual oofRepBlock* clone() const;
1454 
1455 // getters
1456  virtual oofString text() const;
1457 
1458 // multi-method dispatch to factories for rendering report objects
1459  virtual void makeRender(const oofRepMacEnv& env);
1460  virtual void makeRender(const oofRepMacCGEnv& env);
1461  virtual void makeRender(const oofRepWinEnv& env);
1462  virtual void makeRender(const oofRepGDIPlusEnv& env);
1463  virtual void makeRender(const oofRepTextEnv& env);
1464  virtual void makeRender(const oofRepRTFEnv& env);
1465  virtual void makeRender(const oofRepHTMLEnv& env);
1466  virtual void makeRender(const oofRepCSVEnv& env);
1467  virtual void makeRender(const oofRepTSVEnv& env);
1468  virtual void makeRender(const oofRepXMLEnv& env);
1469 #ifndef OOF_REP_NO_GUI
1470  virtual void makeRender(const oofRepEditingEnv&);
1471 #endif
1472 
1473  // interface for iterating and editing text pieces as if they were cells in array
1474  virtual unsigned int countCells() const;
1475  virtual oofString getCellText(bool* outIsEditable=0, oofString* outLocationName=0, long row=0, short col=0) const;
1476  virtual void setCellText(const oofString&, long row=0, short col=0);
1477 
1478 private:
1479  void CompleteInit();
1480 
1481 protected:
1482 // data storage
1484 };
1485 
1491 public:
1492  oofRepBracketedTextBlock(const char* leadingText, const char* trailingText, oofRepTextStyle* adoptedStyle=0);
1493  // take only const char* args as our subclasses will often pass 0, avoid temporary construction
1494 
1495 // getters
1496  virtual oofString text() const;
1497  oofString leadingText() const;
1498  oofString trailingText() const;
1499 
1500  // interface for iterating and editing text pieces as if they were cells in array
1501  virtual unsigned int countCells() const;
1502 
1503 protected:
1504  virtual oofString MiddleText() const=0;
1505 
1506 protected:
1507 // data storage
1509 };
1510 
1511 
1517 public:
1518  oofRepPictBlock(oofPict* adoptedPict, oofRepTextStyle* adoptedStyle=0);
1519  // use default copy ctor, dtor
1520  virtual oofRepBlock* clone() const;
1521 
1522  virtual unsigned long fixedHeight();
1523  virtual unsigned long width();
1524 
1525 // multi-method dispatch to factories for rendering report objects
1526  virtual void makeRender(const oofRepMacEnv& env);
1527  virtual void makeRender(const oofRepMacCGEnv& env);
1528  virtual void makeRender(const oofRepWinEnv& env);
1529  virtual void makeRender(const oofRepGDIPlusEnv& env);
1530  virtual void makeRender(const oofRepTextEnv& env);
1531  virtual void makeRender(const oofRepRTFEnv& env);
1532  virtual void makeRender(const oofRepHTMLEnv& env);
1533  virtual void makeRender(const oofRepCSVEnv& env);
1534  virtual void makeRender(const oofRepTSVEnv& env);
1535  virtual void makeRender(const oofRepXMLEnv& env);//dg 22/2/99
1536 #ifndef OOF_REP_NO_GUI
1537  virtual void makeRender(const oofRepEditingEnv&);
1538 #endif
1539 
1540  // interface for iterating and editing text pieces as if they were cells in array
1541  virtual unsigned int countCells() const;
1542  virtual oofString getCellText(bool* outIsEditable=0, oofString* outLocationName=0, long row=0, short col=0) const;
1543 };
1544 
1545 
1551 public:
1552  oofRepFieldBlock(dbField*, oofRepTextStyle* adoptedStyle=0);
1553  oofRepFieldBlock(const oofString& leadingText, dbField*, oofRepTextStyle* adoptedStyle=0);
1554  oofRepFieldBlock(const oofString& leadingText, dbField*, const oofString& trailingText, oofRepTextStyle* adoptedStyle=0);
1555 // use default copy ctor
1556  virtual ~oofRepFieldBlock();
1557  virtual oofRepBlock* clone() const;
1558 
1559  // interface for iterating and editing text pieces as if they were cells in array
1560  virtual oofString getCellText(bool* outIsEditable=0, oofString* outLocationName=0, long row=0, short col=0) const;
1561  virtual void setCellText(const oofString&, long row=0, short col=0);
1562 
1563 protected:
1564  virtual oofString MiddleText() const;
1565 
1566 private:
1567 // data storage
1568  dbField* mField;
1569 };
1570 
1571 
1577 public:
1578  oofRepPageNoBlock(const char* leadingText=0, const char* trailingText=0, oofRepTextStyle* adoptedStyle=0);
1579  oofRepPageNoBlock(const oofString& leadingText, oofRepTextStyle* adoptedStyle=0);
1580  oofRepPageNoBlock(const oofString& leadingText, const oofString& trailingText, oofRepTextStyle* adoptedStyle=0);
1581 // use default copy ctor
1582  virtual ~oofRepPageNoBlock() {};
1583 
1584  virtual void makeRender(const oofRepXMLEnv& env);
1585  virtual void makeRender(const oofRepRTFEnv& env);
1586 
1587  // interface for iterating and editing text pieces as if they were cells in array
1588  virtual oofString getCellText(bool* outIsEditable=0, oofString* outLocationName=0, long row=0, short col=0) const;
1589  virtual void setCellText(const oofString&, long row=0, short col=0);
1590 
1591 protected:
1592  virtual oofString MiddleText() const;
1593 
1594  virtual oofRepBlock* clone() const;
1595 };
1596 
1597 
1605 public:
1606  oofRepBreak(oofRepBand* adoptedBand, bool newPageEveryTime=false);
1607  oofRepBreak(const oofRepBreak&);
1608  virtual ~oofRepBreak();
1609  virtual oofRepBreak* clone()=0;
1610  virtual bool breaks()=0;
1611  virtual void finishConstruction();
1612 
1613  void newPageEveryTime(bool);
1614  virtual bool newPage(); // allow overrides
1615  oofRepBand* band() const;
1616 
1617 protected:
1618 // data storage
1619  oofRepBand* mBand; // owned
1621 };
1622 
1623 
1631 public:
1632  oofRepBreakEveryRecord(oofRepBand* adoptedBand=0, bool newPageEveryTime=false);
1634  virtual oofRepBreak* clone();
1635  virtual bool breaks();
1636 
1637 // serialization methods
1638  static void registerSerializable();
1639  static oofSerializable* makeBreak(const oofString&);
1640  virtual oofString serialize() const;
1641  virtual oofString signature() const;
1642 };
1643 
1644 
1650 public:
1651  oofRepPictBand(oofPict* adoptedPict);
1652  // use default copy ctor, dtor
1653 
1654  virtual oofRepBand* clone() const;
1655  virtual unsigned long fixedHeight();
1656  unsigned long fixedWidth();
1657 
1658 // multi-method dispatch to factories for rendering report objects
1659  virtual void makeRender(const oofRepMacEnv& env);
1660  virtual void makeRender(const oofRepMacCGEnv& env);
1661  virtual void makeRender(const oofRepWinEnv& env);
1662  virtual void makeRender(const oofRepGDIPlusEnv& env);
1663  virtual void makeRender(const oofRepTextEnv& env);
1664  virtual void makeRender(const oofRepRTFEnv& env);
1665  virtual void makeRender(const oofRepHTMLEnv& env);
1666  virtual void makeRender(const oofRepCSVEnv& env);
1667  virtual void makeRender(const oofRepTSVEnv& env);
1668  virtual void makeRender(const oofRepXMLEnv& env);// dg 22/2/99
1669 
1670 };
1671 
1672 
1682 public:
1683  virtual ~oofDE() {};
1684  virtual void draw() const=0;
1685  static void appendElement(oofDE* adoptedDE);
1686 };
1687 
1688 
1694 public:
1695  oofPositionedDE(int x, int y) :
1696  mX(x), mY(y)
1697  {};
1698 
1699 protected:
1700  int mX, mY;
1701 };
1702 
1703 
1709 public:
1710  oofSizedDE(int x, int y, int right, int bottom) :
1711  oofPositionedDE(x, y),
1712  mRight(right),
1713  mBottom(bottom)
1714  {};
1715 
1716  oofSizedDE(const oofRect& R) :
1717  oofPositionedDE(R.left, R.top),
1718  mRight(R.right),
1719  mBottom(R.bottom)
1720  {};
1721 
1722  int width() const;
1723  int height() const;
1724 
1725 protected:
1726  int mRight, mBottom;
1727 };
1728 
1729 
1735 public:
1736  oofTextDE(int x, int y, const oofString& inStr) :
1737  oofPositionedDE(x, y),
1738  mString(inStr)
1739  {};
1740  oofTextDE(int x, int y, const char* lpString, int cbString) :
1741  oofPositionedDE(x, y),
1742  mString(lpString, cbString)
1743  {};
1744 
1745  virtual void draw() const=0;
1746  const oofString& str() const;
1747  void str(const oofString&);
1748 
1749 protected:
1751 };
1752 
1753 
1759 public:
1760  oofRepPage();
1761  void draw(const oofRect&);
1762  ~oofRepPage();
1763 
1764  void appendElement(oofDE* adoptedElement);
1765  oofDE* element(unsigned long) const;
1767 
1769 private:
1770  static oofRepPage* sCurrentPage;
1771 };
1772 
1773 
1781 public:
1782  ~oofRepPageList();
1783 
1784  void appendPage(oofRepPage* adoptedPage);
1785  oofRepPage* page(unsigned long) const;
1788  void deleteAll();
1789 };
1790 
1791 
1792 
1797 class OOFREP_EXPORT oofTextStyleDE : public oofDE { // report-writer drawing element
1798 public:
1799  oofTextStyleDE(const oofRepTextStyle* copiedStyle);
1800  virtual ~oofTextStyleDE();
1801 
1802  const oofRepTextStyle* style() const;
1803 
1804 protected:
1806 };
1807 
1808 
1809 
1821 public:
1822  OOF_repBufferSettingVisitor(bool settingBufferForever) :
1823  mSettingBufferForever(settingBufferForever)
1824  {};
1825 
1826 protected:
1827  virtual void VisitView(dbView*);
1828 
1830 };
1831 
1832 
1833 // -------------------------------------------------------
1834 // o o f R e p R e n d e r D e c o r a t o r
1835 // -------------------------------------------------------
1836 inline void
1838 {
1839  assert(!mWrappedRender);
1840  mWrappedRender = adoptedRealRender;
1841 }
1842 
1843 
1844 // -------------------------------------------------------
1845 // o o f R e p D r a w a b l e
1846 // -------------------------------------------------------
1847 inline oofString
1849 {
1850  return mID;
1851 }
1852 
1853 
1854 inline void
1856 {
1857  assert(mID.isEmpty() || (mID==inID));
1858  mID = inID;
1859 }
1860 
1861 
1862 inline void
1864 {
1865  mID.clear();
1866 }
1867 
1868 
1869 
1870 // -------------------------------------------------------
1871 // o o f R e p
1872 // -------------------------------------------------------
1873 inline oofRepBandList&
1875 {
1876  return mPageHeaders;
1877 }
1878 
1879 
1880 inline oofRepBandList&
1882 {
1883  return mPageFooters;
1884 }
1885 
1886 inline oofRepBandList&
1888 {
1889  return mFirstPageHeaders;
1890 }
1891 
1892 
1893 inline oofRepBandList&
1895 {
1896  return mFirstPageFooters;
1897 }
1898 
1899 inline oofRepEnvironment*
1901 {
1902  return mDrawingEnv;
1903 }
1904 
1911 inline void
1913 {
1914  mDrawingEnv=inEnv;
1915 }
1916 
1917 
1918 inline unsigned long
1920 {
1921  return mPageNumber;
1922 }
1923 
1924 
1925 inline unsigned long
1927 {
1928  return mStartingPageNumber;
1929 }
1930 
1931 
1932 inline oofRepIterableTreeBand*
1934 {
1935  return mTopBand;
1936 }
1937 
1938 
1939 
1940 inline unsigned long&
1942 {
1943  return mVerticalPos;
1944 }
1945 
1946 
1947 inline unsigned long
1949 {
1950  return mBodyStart;
1951 }
1952 
1953 
1954 inline unsigned long
1956 {
1957  return mFootersStartAt;
1958 }
1959 
1960 inline unsigned long
1962 {
1963  return mFootersStartAt-mBodyStart;
1964 }
1965 
1966 
1967 inline unsigned long
1969 {
1970  return mBodyWidth;
1971 }
1972 
1973 
1974 inline unsigned long
1976 {
1977  return mPageWidth;
1978 }
1979 
1980 
1981 inline unsigned long
1983 {
1984  return mPageHeight;
1985 }
1986 
1987 
1988 inline void
1989 oofRep::pageNumber(unsigned long n)
1990 {
1991  mPageNumber = n;
1992 }
1993 
1994 
1995 inline void
1997 {
1998  mStartingPageNumber = n;
1999 }
2000 
2001 
2002 inline oofRep*
2004 {
2005  return sCurrentReport;
2006 }
2007 
2008 
2014 inline void
2016 {
2018 }
2019 
2020 
2024 inline void
2026 {
2028 }
2029 
2030 
2034 inline void
2036 {
2038 }
2039 
2040 
2041 inline unsigned short
2043 {
2045 }
2046 
2047 
2048 inline bool
2050 {
2051  return (settings()->reportEditor() != NULL);
2052 }
2053 
2054 
2058 inline void
2060 {
2062 }
2063 
2064 
2065 
2066 // -------------------------------------------------------
2067 // o o f R e p M u l t i
2068 // -------------------------------------------------------
2069 inline unsigned long
2071 {
2072  return mSections.count();
2073 }
2074 
2075 
2076 inline oofRepSection*
2077 oofRepMulti::section(unsigned long n) const
2078 {
2079  return (oofRepSection*) mSections.value(n);
2080 }
2081 
2082 
2083 
2084 // -------------------------------------------------------
2085 // o o f R e p V i e w B a n d
2086 // -------------------------------------------------------
2087 inline void
2089 {
2090  // Place a check in there to make sure they aren't trying to set it more than once.
2091  if( mIsBoxed==false ) {
2093  }
2094 
2095  mIsBoxed=true;
2096 }
2097 
2098 
2099 inline bool
2101 {
2102  return mIsBoxed;
2103 }
2104 
2105 
2106 inline void
2108 {
2109  mColHeadersNeedCalc = true;
2110 }
2111 
2112 
2113 // -------------------------------------------------------
2114 // O O F _ m i x I t e r a b l e B a n d
2115 // -------------------------------------------------------
2116 inline oofRepBreakList&
2118 {
2119  return mHeaderBreaks;
2120 }
2121 
2122 
2123 inline oofRepBreakList&
2125 {
2126  return mFooterBreaks;
2127 }
2128 
2129 
2130 // -------------------------------------------------------
2131 // O O F _ m i x B a n d W i t h S u b B a n d s
2132 // -------------------------------------------------------
2133 inline oofRepBandList&
2135 {
2136  return mHeaders;
2137 }
2138 
2139 
2140 inline oofRepBandList&
2142 {
2143  return mFooters;
2144 }
2145 
2146 
2147 // -------------------------------------------------------
2148 // O O F _ m i x C o l u m n a r B a n d
2149 // -------------------------------------------------------
2150 inline bool
2152 {
2153  return (mCustomDrawers.count()>0);
2154 }
2155 
2156 
2157 inline bool
2159 {
2160  // if no flags ever set, no array exists
2161  return (mNonEditableFields && mNonEditableFields[col]);
2162 }
2163 
2164 
2165 // -------------------------------------------------------
2166 // o o f R e p S p a c e B a n d
2167 // -------------------------------------------------------
2168 inline unsigned long
2170 {
2171  return mHeight;
2172 }
2173 
2174 
2175 // -------------------------------------------------------
2176 // o o f R e p L i n e B a n d
2177 // -------------------------------------------------------
2178 inline unsigned long
2180 {
2181  return mHeight;
2182 }
2183 
2184 inline bool
2186 {
2187  return mGrey;
2188 }
2189 
2190 
2191 // -------------------------------------------------------
2192 // o o f R e p L a y o u t B a n d
2193 // -------------------------------------------------------
2194 inline oofRepLayoutBand*
2196 {
2197  return sCurrentLayout;
2198 }
2199 
2200 
2201 // -------------------------------------------------------
2202 // o o f R e p B l o c k
2203 // -------------------------------------------------------
2206 {
2207  return mAlignment;
2208 }
2209 
2214 inline bool
2216 {
2217  return mMoveDownAfter;
2218 }
2219 
2220 
2221 inline unsigned long
2223 {
2224  return textStyle()->fixedHeight();
2225 }
2226 
2227 
2228 inline unsigned long
2230 {
2231  return mFixedWidth;
2232 }
2233 
2234 
2235 
2236 // -------------------------------------------------------
2237 // o o f R e p B l o c k
2238 // -------------------------------------------------------
2239 inline oofString
2241 {
2242  return mText;
2243 }
2244 
2245 
2246 inline oofString
2248 {
2249  return mTrailingText;
2250 }
2251 
2252 
2253 
2254 // -------------------------------------------------------
2255 // o o f R e p B a n d L i s t
2256 // -------------------------------------------------------
2257 
2258 inline void
2260 {
2261  mBands.start();
2262 }
2263 
2264 
2265 inline bool
2267 {
2268  return mBands.more();
2269 }
2270 
2271 
2272 inline void
2274 {
2275  mBands.next();
2276 }
2277 
2278 inline void
2279 oofRepBandList::deleteItem(unsigned long index)
2280 {
2281  mBands.deleteItem(index);
2282 
2283 }
2284 inline unsigned long
2286 {
2287  return mBands.count();
2288 }
2289 
2290 
2291 inline oofRepBand*
2293 {
2294  oofRepBand* ret = (oofRepBand*) mBands(); // safe downcast
2295  return ret;
2296 }
2297 
2298 
2299 inline oofRepBand*
2300 oofRepBandList::operator[](unsigned long index)
2301 {
2302  oofRepBand* ret = (oofRepBand*) mBands[index]; // safe downcast
2303  return ret;
2304 }
2305 
2306 
2307 inline oofRepBand*
2309 {
2310  oofRepBand* ret = (oofRepBand*) mBands(); // safe downcast
2311  return ret;
2312 }
2313 
2314 
2315 inline oofRepBand*
2316 oofRepBandList::value(unsigned long index) const
2317 {
2318  oofRepBand* ret = (oofRepBand*) mBands.value(index); // safe downcast
2319  return ret;
2320 }
2321 
2322 
2323 inline oofRepBandList&
2325 {
2326  append(adoptedBand);
2327  return *this;
2328 }
2329 
2330 
2331 inline oofRepBandList&
2333 {
2334  append(prototypeBand.clone());
2335  return *this;
2336 }
2337 
2338 
2339 inline unsigned long
2341 {
2342  return mMinHeight;
2343 }
2344 
2345 
2346 inline bool
2348 // user enquiry expected to be called after finishConstruction
2349 {
2350  assert(mKeepTogether != eDefaultTogether);
2351  const bool ret = (mKeepTogether == eKeepTogether);
2352  return ret;
2353 }
2354 
2355 
2356 inline void
2358 {
2359  if (willKeep)
2360  mKeepTogether = eKeepTogether;
2361  else
2362  mKeepTogether = eAllowSplit;
2363 }
2364 
2365 
2366 // -------------------------------------------------------
2367 // o o f R e p B l o c k L i s t
2368 // -------------------------------------------------------
2369 
2370 inline void
2372 {
2373  mBlocks.start();
2374 }
2375 
2376 
2377 inline bool
2379 {
2380  return mBlocks.more();
2381 }
2382 
2383 
2384 inline void
2386 {
2387  mBlocks.next();
2388 }
2389 
2390 
2391 inline unsigned long
2393 {
2394  return mBlocks.count();
2395 }
2396 
2397 
2398 inline oofRepBlock*
2400 {
2401  oofRepBlock* ret = (oofRepBlock*) mBlocks(); // safe downcast
2402  return ret;
2403 }
2404 
2405 
2406 inline oofRepBlock*
2407 oofRepBlockList::operator[](unsigned long index)
2408 {
2409  oofRepBlock* ret = (oofRepBlock*) mBlocks[index]; // safe downcast
2410  return ret;
2411 }
2412 
2413 
2414 inline oofRepBlock*
2416 {
2417  oofRepBlock* ret = (oofRepBlock*) mBlocks(); // safe downcast
2418  return ret;
2419 }
2420 
2421 
2422 inline oofRepBlock*
2423 oofRepBlockList::value(unsigned long index) const
2424 {
2425  oofRepBlock* ret = (oofRepBlock*) mBlocks.value(index); // safe downcast
2426  return ret;
2427 }
2428 
2429 
2430 inline oofRepBlockList&
2432 {
2433  append(adoptedBlock);
2434  return *this;
2435 }
2436 
2437 
2438 // -------------------------------------------------------
2439 // o o f R e p B r e a k L i s t
2440 // -------------------------------------------------------
2441 
2442 inline void
2444 {
2445  mBreaks.start();
2446 }
2447 
2448 
2449 inline bool
2451 {
2452  return mBreaks.more();
2453 }
2454 
2455 
2456 inline void
2458 {
2459  mBreaks.next();
2460 }
2461 
2462 
2463 inline unsigned long
2465 {
2466  return mBreaks.count();
2467 }
2468 
2469 
2470 inline oofRepBreak*
2472 {
2473  oofRepBreak* ret = (oofRepBreak*) mBreaks(); // safe downcast
2474  return ret;
2475 }
2476 
2477 
2478 inline oofRepBreak*
2479 oofRepBreakList::operator[](unsigned long index)
2480 {
2481  oofRepBreak* ret = (oofRepBreak*) mBreaks[index]; // safe downcast
2482  return ret;
2483 }
2484 
2485 
2486 inline oofRepBreak*
2488 {
2489  oofRepBreak* ret = (oofRepBreak*) mBreaks(); // safe downcast
2490  return ret;
2491 }
2492 
2493 
2494 inline oofRepBreak*
2495 oofRepBreakList::value(unsigned long index) const
2496 {
2497  oofRepBreak* ret = (oofRepBreak*) mBreaks.value(index); // safe downcast
2498  return ret;
2499 }
2500 
2501 inline oofRepBreakList&
2503 {
2504  append(adoptedBreak);
2505  return *this;
2506 }
2507 
2508 
2509 // -------------------------------------------------------
2510 // o o f R e p B r e a k
2511 // -------------------------------------------------------
2512 inline oofRepBand*
2514 {
2515  return mBand;
2516 }
2517 
2518 
2519 inline void
2521 {
2522  mNewPageEveryTime = inNewPageFlag;
2523 }
2524 
2525 
2526 // -------------------------------------------------------
2527 // o o f R e p D e f a u l t S e t t i n g s
2528 // -------------------------------------------------------
2529 inline oofRepSettings *
2531 {
2532  return sDefaultSettings;
2533 }
2534 
2535 
2536 // -------------------------------------------------------
2537 // o o f R e p T e x t S t y l e
2538 // -------------------------------------------------------
2539 inline const oofString&
2541 {
2542  assert(invariant());
2543  return mFontName;
2544 }
2545 
2546 
2547 inline unsigned short
2549 {
2550  assert(invariant());
2551  return mFontSize;
2552 }
2553 
2554 
2555 inline unsigned char
2557 {
2558  return mStyleNum;
2559 }
2560 
2561 
2562 inline short
2564 {
2565  return mLeading;
2566 }
2567 
2568 
2569 inline const oofColor&
2571 {
2572  return mColor;
2573 }
2574 
2575 
2578 {
2579  return mAlignment;
2580 }
2581 
2582 
2583 inline void
2585 {
2586  mFontName = inName;
2587 }
2588 
2589 
2590 inline void
2591 oofRepTextStyle::fontSize(unsigned short inSize)
2592 {
2593  mFontSize = inSize;
2594 }
2595 
2596 
2597 inline void
2598 oofRepTextStyle::fontStyle(unsigned char inStyle)
2599 {
2600  mStyleNum = inStyle;
2601 }
2602 
2603 
2604 inline void
2606 {
2607  mLeading = inLeading;
2608 }
2609 
2610 
2611 inline void
2613 {
2614  mColor = inColor;
2615 }
2616 
2617 inline void
2619 {
2620  mAlignment = inAlignment;
2621 }
2622 
2623 #ifdef _Windows
2624 inline const LOGFONT&
2625 oofRepTextStyle::getLogFont() const
2626 {
2627  return mLogFont;
2628 }
2629 #endif
2630 
2631 
2632 inline bool
2634 {
2635  const bool ret =
2636  !mFontName.isEmpty() &&
2637  (mFontSize > 0)
2638 #ifdef _Windows
2639  && (mLogFont.lfHeight != 0) // absolute test, don't assume positive
2640 #endif
2641  ;
2642  return ret;
2643 }
2644 
2645 
2646 // -------------------------------------------------------
2647 // o o f R e p T e x t S t y l a b l e
2648 // -------------------------------------------------------
2653 inline oofRepTextStyle*
2655 {
2656  return mStyle;
2657 }
2658 
2659 
2660 inline std::ostream&
2661 operator<<(std::ostream& os, oofRepTextStyle* S)
2662 {
2663  S->extract(os);
2664  return os;
2665 }
2666 
2667 
2668 // -------------------------------------------------------
2669 // o o f R e p G r a p h B a n d
2670 // -------------------------------------------------------
2671 inline oofGraph*
2673 {
2674  return mGraphPtr;
2675 }
2676 
2677 
2678 inline unsigned long
2680 {
2681  return mGrWid;
2682 }
2683 
2684 
2685 inline unsigned long
2687 {
2688  return mGrHgt;
2689 }
2690 
2691 
2692 inline unsigned long
2694 {
2695  return mSavedGrWid;
2696 }
2697 
2698 
2699 inline unsigned long
2701 {
2702  return mSavedGrHgt;
2703 }
2704 
2705 
2706 inline unsigned long
2708 {
2709  return mDrawingHeight;
2710 }
2711 
2712 
2713 
2714 // -------------------------------------------------------
2715 // o o f R e p L a y o u t B a n d
2716 // -------------------------------------------------------
2717 inline oofRepBlockList&
2719 {
2720  return mBlocks;
2721 }
2722 
2723 // -------------------------------------------------------
2724 // o o f R e p S t r e a m E n v
2725 // -------------------------------------------------------
2726 inline std::ostream&
2728 {
2729  return *sOut;
2730 }
2731 
2732 // -------------------------------------------------------
2733 // o o f R e p P i c t B a n d
2734 // -------------------------------------------------------
2735 inline unsigned long
2737 {
2738  return OOF_mixPictOwner::height();
2739 }
2740 
2741 inline unsigned long
2743 {
2744  return OOF_mixPictOwner::width();
2745 }
2746 
2747 
2748 // -------------------------------------------------------
2749 // o o f R e p P a g e L i s t
2750 // -------------------------------------------------------
2751 inline oofRepPage*
2752 oofRepPageList::page(unsigned long n) const
2753 {
2754  return (oofRepPage*)value(n);
2755 }
2756 
2757 
2758 inline void
2760 {
2761  append((unsigned long)adoptedPage);
2762 }
2763 
2764 
2765 // -------------------------------------------------------
2766 // o o f R e p P a g e
2767 // -------------------------------------------------------
2768 inline oofDE*
2769 oofRepPage::element(unsigned long n) const
2770 {
2771  return (oofDE*)value(n);
2772 }
2773 
2774 
2775 inline void
2777 {
2778  append((unsigned long)adoptedElement);
2779 }
2780 
2781 
2782 inline oofRepPage*
2784 {
2785  return sCurrentPage;
2786 }
2787 
2788 
2789 
2790 // -------------------------------------------------------
2791 // o o f T e x t S t y l e D E
2792 // -------------------------------------------------------
2793 inline const oofRepTextStyle*
2795 {
2796  return mStyle;
2797 }
2798 
2799 
2800 
2801 // -------------------------------------------------------
2802 // u t i l i t y f u n c t i o n s
2803 // -------------------------------------------------------
2804 inline int
2805 twips( int pixels )
2806 {
2807  return pixels*20;
2808 }
2809 
2810 
2811 // -------------------------------------------------------
2812 // o o f T e x t D E
2813 // -------------------------------------------------------
2814 inline const oofString&
2816 {
2817  return mString;
2818 }
2819 
2820 
2821 inline void
2823 {
2824  mString = inStr;
2825 }
2826 
2827 
2828 // -------------------------------------------------------
2829 // o o f S i z e d D E
2830 // -------------------------------------------------------
2831 inline int
2833 {
2834  return mRight-mX;
2835 }
2836 
2837 
2838 inline int
2840 {
2841  return mBottom-mY;
2842 }
2843 
2844 
2845 #endif
2846 
2847 
Singleton used to initialise oofRepSettings.
Definition: oofrep.h:276
static oofRep * sCurrentReport
Definition: oofrep.h:666
oofRepBreak * mCurrentBreak
Definition: oofrep.h:650
Base environment for rendering to a text stream.
Definition: oofrep.h:446
unsigned long mFootersStartAt
Definition: oofrep.h:651
virtual oofString serialize() const
Definition: oofxmldb.cpp:293
oofRepBreak * value(unsigned long) const
Definition: oofrep.h:2495
virtual ~oofRepSpaceBand()
Definition: oofrep.h:1054
oofString leadingText() const
Definition: oofrep.h:2240
oofRepBreakList & footerBreaks()
Definition: oofrep.h:2124
static oofRepLayoutBand * currentLayout()
Definition: oofrep.h:2195
void incrementIteratingBandLevel()
Call when visiting tree enters band implementing OOF_mixIterableBand.
Definition: oofrep.h:2025
blockAlignT mAlignment
Definition: oofrep.h:1436
Mix in adorners with report objects (used mainly in oofrep.h).
Definition: oofadorn.h:102
std::ostream & operator<<(std::ostream &os, oofRepTextStyle *S)
Definition: oofrep.h:2661
Cross-platform way to specify rectangle with Mac-style setter.
Definition: oofRect.h:39
oofrpMacCG.h
Definition: oofrpGDIPlus.h:37
void deleteAll()
Definition: oofrep2.cpp:1421
Convenient top-level parent band mixing in all the exotic aspects.
Definition: oofrep.h:1256
unsigned long width()
Definition: oofdraw.h:433
bool invariant() const
true after full initialisation
Definition: oofrep.h:2633
unsigned char fontStyle() const
Definition: oofrep.h:2556
virtual ~oofRepBreakEveryRecord()
Definition: oofrep.h:1633
int mBottom
Definition: oofrep.h:1726
Convenient mixin if you want to have a band which iterates and has breaks.
Definition: oofrep.h:918
virtual oofRepTextStyle * textStyle() const
Definition: oofrep1.cpp:1622
Abstract report-writer drawing element for piece of mono-styled text.
Definition: oofrep.h:1734
virtual OOF_mixIterableBand * asIterableBand()
Definition: oofrep1.cpp:1547
virtual unsigned long width() const
Definition: oofrep1.cpp:1444
unsigned long mPageHeight
Definition: oofrep.h:651
unsigned short mNestedIteratingBandLevel
1=in body view as zero allowed for outside the main body view
Definition: oofrep.h:661
virtual bool maybeComplexBand() const
Overall guard flag to simplify checks for capabilities.
Definition: oofrep1.cpp:1526
virtual oofRepTextStyle * textStyle() const
Get the text style owned by this object or a default.
Definition: oofrep1.cpp:1827
int twips(int pixels)
Definition: oofrep.h:2805
short leading() const
Definition: oofrep.h:2563
oofRepBandList & firstPageHeaders()
Definition: oofrep.h:1887
virtual unsigned long fixedHeight()
Definition: oofrep.h:2222
oofRepPage * page(unsigned long) const
Definition: oofrep.h:2752
Empty top band in a report used if composing all in headers.
Definition: oofrep.h:1371
virtual unsigned long fixedHeight()
Definition: oofrep1.cpp:1274
oofRepBandList & footers()
Definition: oofrep.h:2141
virtual void drawSquished(long &balanceToSave)
Definition: oofrep1.cpp:1540
virtual void makeRender(const oofRepMacEnv &env)
Definition: oofrepMac.cpp:169
visits all dbViews in a report.
Definition: oofrep.h:555
virtual ~oofRepRender()
Definition: oofrep.h:819
virtual unsigned long fixedHeight()
Definition: oofrep.h:2179
oofRepBreakList & headerBreaks()
Definition: oofrep.h:2117
Specify output to simple spaced text stream.
Definition: oofrptxt.h:31
Abstract base for anything drawn on report.
Definition: oofrep.h:860
unsigned short * mReferences
owned
Definition: oofrep.h:664
oofRepBandList mFirstPageFooters
Definition: oofrep.h:645
void next()
Definition: oofrep.h:2273
Force break to a new page for each record drawn by oofRepViewBand.
Definition: oofrep.h:1630
oofRepBandList & pageFooters()
Definition: oofrep.h:1881
unsigned long originalGraphHeight() const
Definition: oofrep.h:2700
virtual void draw(oofRepEnvironment &)
Definition: oofrep1.cpp:479
Convenient mixin if your band is rendered in columns with custom drawing.
Definition: oofrep.h:980
virtual void startTableWrapper()
Definition: oofrep2.cpp:71
Base class for objects that can be serialised out to XML Serialisation allows you to have custom calc...
Definition: oofxmldb.h:28
oofRepBreak * operator[](unsigned long index)
Definition: oofrep.h:2479
bool mFinishedConstruction
Definition: oofrep.h:659
unsigned long originalGraphWidth() const
Definition: oofrep.h:2693
virtual ~oofRepBand()
Definition: oofrep.h:1028
unsigned long graphWidth() const
Definition: oofrep.h:2679
Decorator pattern - forwards most calls directly to owned renderer.
Definition: oofrep.h:834
unsigned long fixedHeight()
Definition: oofrep1.cpp:1757
virtual oofRepBlock * clone() const
Definition: oofrep2.cpp:908
oofRepEnvironment * environment() const
Definition: oofrep.h:1900
void start()
Definition: oofrep.h:2259
oofString mText
Definition: oofrep.h:1483
virtual void draw()
Definition: oofrep.h:821
oofRepBlock * operator[](unsigned long index)
Definition: oofrep.h:2407
virtual ~oofRepPageNoBlock()
Definition: oofrep.h:1582
bool mResetPageNumber
Definition: oofrep.h:720
void next()
Definition: oofrep.h:2385
virtual void VisitView(dbView *)=0
Report that contains list of unrelated other reports as oofRepSection's.
Definition: oofrep.h:677
bool isBoxed() const
Definition: oofrep.h:2100
virtual bool more()=0
Base for specifying Win32 GUI drawing environment.
Definition: oofrpWin.h:46
void setBoxed()
Definition: oofrep.h:2088
oofRepBandList mHeaders
Definition: oofrep.h:950
unsigned long bodyHeight()
Definition: oofrep.h:1961
void extract(std::ostream &) const
Definition: oofrep1.cpp:1765
virtual oofRepBlock * clone() const =0
oofRepTextStyle * mStyle
Definition: oofrep.h:1805
oofRepBlock * value(unsigned long) const
Definition: oofrep.h:2423
oofRepBreakList & operator<<(oofRepBreak *adoptedBreak)
Definition: oofrep.h:2502
std::ostream * mOut
Definition: oofrep.h:457
oofRepEnvironment * mDrawingEnv
Definition: oofrep.h:656
oofRepBandList mPageFooters
Definition: oofrep.h:647
oofRepTextStyle * mStyle
Definition: oofrep.h:805
oofRepRenderT mLastRenderType
Definition: oofrep.h:660
oofRepIterableTreeBand * body()
Definition: oofrep.h:1933
virtual bool more()
Definition: oofrep2.cpp:133
virtual unsigned int countCells() const
Definition: oofrep1.cpp:1638
unsigned long count() const
Definition: oofarray.h:126
Abstract base for drawing text content with some bracketing text in an oofRepLayoutBand.
Definition: oofrep.h:1490
unsigned long count() const
Definition: oofrep.h:2392
virtual void draw() const =0
unsigned long graphHeight() const
Definition: oofrep.h:2686
virtual ~oofRepBlock()
Definition: oofrep.h:1414
blockAlignT align() const
Definition: oofrep.h:2205
bool more() const
Definition: oofrep.h:2450
Most commonly used top band in a report.
Definition: oofrep.h:1283
unsigned long count() const
Definition: oofrep.h:2070
oofRepBandList & operator<<(oofRepBand *adoptedBand)
Definition: oofrep.h:2324
oofAdornerList & adorners()
Definition: oofadorn.h:354
oofRepBlockList & operator<<(oofRepBlock *adoptedBlock)
Definition: oofrep.h:2431
oofRepSettings * mSettings
owned
Definition: oofrep.h:657
oofRepBandList & firstPageFooters()
Definition: oofrep.h:1894
oofString mString
Definition: oofrep.h:1750
unsigned long bodyWidth()
Definition: oofrep.h:1968
void deleteItem(unsigned long index)
Definition: oofrep.h:2279
virtual bool isLayoutBand() const
Definition: oofrep1.cpp:1533
unsigned long height()
Definition: oofdraw.h:427
Base rendering class.
Definition: oofrep.h:816
void restoreEnvironment(oofRepEnvironment *)
Use to restore a saved environment when in a print preview.
Definition: oofrep.h:1912
virtual unsigned int countCells() const
Definition: oofrep2.cpp:922
virtual void startTableBody()
Definition: oofrep2.cpp:77
unsigned long drawingHeight() const
Definition: oofrep.h:2707
oofRepData * mRepData
owned
Definition: oofrep.h:662
int mRight
Definition: oofrep.h:1726
unsigned long count() const
Definition: oofrep.h:2285
oofRepBand * band() const
Definition: oofrep.h:2513
Maintain the context of report data to reset dbView's etc.
Definition: oofrep1.cpp:174
unsigned long mStartingPageNumber
Definition: oofrep.h:663
virtual oofRepBreak * clone()=0
List of adorners attached to report element.
Definition: oofadorn.h:70
Graph class subclassed to draw different graph types.
Definition: oofGrphs.h:71
virtual bool grey()
Definition: oofrep.h:2185
bool * mNonEditableFields
owned
Definition: oofrep.h:1013
void newPageEveryTime(bool)
Definition: oofrep.h:2520
virtual oofString getCellText(bool *outIsEditable=0, oofString *outLocationName=0, long row=0, short col=0) const
Definition: oofrep2.cpp:929
virtual ~oofRepLineBand()
Definition: oofrep.h:1147
virtual bool breaks()=0
oofTextDE(int x, int y, const char *lpString, int cbString)
Definition: oofrep.h:1740
unsigned long pageHeight()
Definition: oofrep.h:1982
const oofRepSettings * settings() const
Definition: oofrep1.cpp:469
Subclass platform preview environment to intercept for editing hooks.
Definition: oofrepeditx.h:368
void next()
Definition: oofrep.h:2457
virtual unsigned long fixedHeight()
Definition: oofrep.h:2736
oofDE * element(unsigned long) const
Definition: oofrep.h:2769
virtual ~oofRepEnvironment()
Definition: oofrep.h:408
virtual oofRepDrawable * drawableContainingColumns()=0
oofRepBand * operator[](unsigned long index)
Definition: oofrep.h:2300
Specify output to HTML stream.
Definition: oofrpHTM.h:27
virtual void setCellText(const oofString &, long row=0, short col=0)
Definition: oofrep2.cpp:944
bool more() const
Definition: oofrep.h:2378
void append(oofRepBand *adoptedBand)
Definition: oofrep1.cpp:1901
Forward declare common report-writer classes.
virtual int numCols() const =0
#define _Windows
This build is on Windows.
Definition: doxyoof.h:440
Convenient mixin if you want to have a band with table wrappers.
Definition: oofrep.h:963
oofColSizer::colAlignT alignment() const
Definition: oofrep.h:2577
oofRepBandList mFirstPageHeaders
Definition: oofrep.h:644
void changeTextStyle(oofRepTextStyle *)
Provide forwarding so report objects that are drawing can affect environment text style...
Definition: oofrep.h:2059
oofRepBreakList mFooterBreaks
Definition: oofrep.h:932
oofRepBlockList & blocks()
Definition: oofrep.h:2718
unsigned long mFixedWidth
Definition: oofrep.h:1435
unsigned short fontSize() const
Definition: oofrep.h:2548
void append(oofRepBlock *adoptedBlock)
Definition: oofrep1.cpp:1999
void deleteItem(unsigned long index)
Definition: oofarray.cpp:137
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
virtual ~oofRepLayoutBand()
Definition: oofrep.h:1186
void start()
Definition: oofrep.h:2371
virtual ~oofRepTextBlock()
Definition: oofrep.h:1452
List of bands attached to report or other bands, eg: page headers.
Definition: oofrep.h:292
Setup databases for editing.
Definition: oofrep.h:1820
oofRepBlock * operator()()
Definition: oofrep.h:2399
bool mMoveDownAfter
Definition: oofrep.h:1437
oofSizedDE(int x, int y, int right, int bottom)
Definition: oofrep.h:1710
unsigned long mPageNumber
Definition: oofrep.h:658
oofRepBand * operator()()
Definition: oofrep.h:2292
virtual void finishConstruction()
Definition: oofrep.h:820
unsigned long pageWidth()
Definition: oofrep.h:1975
Add extra virtual methods used by oofRep::DrawViewBand beyond normal band drawing.
Definition: oofreprn.h:111
void start()
Definition: oofrep.h:2443
void dirtyColHeaders()
Definition: oofrep.h:2107
int width() const
Definition: oofrep.h:2832
Base for specifying Macintosh GUI drawing environment.
Definition: oofrepMac.h:51
virtual void makeRender()
Definition: oofrep.h:420
bool isEmpty() const
Test based on either length or null pointer.
Definition: oofstr.h:413
bool keepTogether() const
Definition: oofrep.h:2347
Top level class for a report.
Definition: oofrep.h:571
Convenient mixin if you want to have a band with sub-bands.
Definition: oofrep.h:944
unsigned long fixedWidth()
Definition: oofrep.h:2742
const oofRepTextStyle * style() const
Definition: oofrep.h:2794
int mCurrentIteration
ranges from 0 up to mMaxIterations-1 whilst iterating report
Definition: oofrep.h:1275
virtual void setCellText(const oofString &, long row=0, short col=0)
Definition: oofrep1.cpp:1655
virtual void start()
Definition: oofrep.h:925
unsigned long bodyStart()
Definition: oofrep.h:1948
oofPositionedDE(int x, int y)
Definition: oofrep.h:1695
Abstract report-writer drawing element with position & rectangular size.
Definition: oofrep.h:1708
static std::ostream & out()
Definition: oofrep.h:2727
oofString trailingText() const
Definition: oofrep.h:2247
unsigned long oofRepRenderT
Definition: oofrep.h:113
virtual void finishConstruction()
null base method occasionally overriden
Definition: oofrep1.cpp:1242
void fixedHeight(unsigned long height)
Definition: oofrep.h:1105
Abstract report-writer drawing element for change of style between text items.
Definition: oofrep.h:1797
unsigned long minHeight() const
Definition: oofrep.h:2340
unsigned long mBodyStart
Definition: oofrep.h:651
OOF_ExpandableLongArray mSections
Definition: oofrep.h:697
virtual oofRepEditLink * makeEditLink(const oofRepEditingEnv &)
Make an editor for this drawable - by default return a null link.
Definition: oofrep1.cpp:1421
bool moveDownAfter() const
Indicate if a layout band should start a new row of blocks.
Definition: oofrep.h:2215
virtual OOF_mixBandWithTableWrappers * asBandWithTableWrappers()
Definition: oofrep1.cpp:1561
Manage pages in a report writer preview.
Definition: oofrep.h:1780
Abstract base for user column drawer.
Definition: oofrep.h:1239
static oofRepPage * currentlyConstructing()
Definition: oofrep.h:2783
Base class used to refer to main OOFILE classes and provide base reflective API.
Definition: oof1.h:49
bool hasCustomViewDrawers() const
Definition: oofrep.h:2151
oofRepBand * mCurrentBand
Definition: oofrep.h:649
const oofString & fontName() const
Definition: oofrep.h:2540
OOF_repBufferSettingVisitor(bool settingBufferForever)
Definition: oofrep.h:1822
visits all report objects.
Definition: oofrep.h:484
OOF_Dictionary mCustomDrawers
Definition: oofrep.h:1012
oofRepIterableTreeBand * mTopBand
owned
Definition: oofrep.h:648
virtual oofString getCellText(bool *outIsEditable=0, oofString *outLocationName=0, long row=0, short col=0) const
Definition: oofrep1.cpp:1645
bool more() const
Definition: oofrep.h:2266
oofRepBreak * operator()()
Definition: oofrep.h:2471
virtual void VisitDrawable(oofRepDrawable *)
Definition: oofrep2.cpp:1679
virtual bool lastRow(unsigned long row)=0
Abstract report-writer drawing element with position.
Definition: oofrep.h:1693
void clear()
Abandon string contents, resetting length.
Definition: oofstr.cpp:2325
Array of longs which expands automatically as you write to cells.
Definition: oofarray.h:21
Specify a fixed height band containing an oofGraph with additional height & width.
Definition: oofrep.h:1080
bool mFirstPage
Definition: oofrep.h:655
void appendPage(oofRepPage *adoptedPage)
Definition: oofrep.h:2759
virtual OOF_mixColumnarBand * asColumnarBand()
Definition: oofrep1.cpp:1568
unsigned int count() const
Definition: oof1.h:1498
virtual void next()
Definition: oofrep2.cpp:140
Base class for persistent tables.
Definition: oof1.h:452
const oofString & str() const
Definition: oofrep.h:2815
virtual oofRepBand * clone() const =0
virtual void endTableBody()
Definition: oofrep2.cpp:83
Portable highly capable string class.
Definition: oofstr.h:101
unsigned long fixedWidth()
Definition: oofrep.h:2229
Cross-platform color specification class.
Definition: oofcolor.h:123
oofRepRender * mWrappedRender
Definition: oofrep.h:851
virtual unsigned long fixedHeight()
Definition: oofrep1.cpp:1507
oofRepBandList mFooters
Definition: oofrep.h:951
virtual bool canDraw()
Definition: oofrep2.cpp:1225
void resetIteratingBandLevel()
Quick reset for visitors.
Definition: oofrep.h:2015
oofRepBandList & pageHeaders()
Definition: oofrep.h:1874
int mMaxIterations
for simple subclasses that aren't driven by a database selection
Definition: oofrep.h:1274
static oofRepSettings * settings()
Definition: oofrep.h:2530
virtual void makeRender(const oofRepMacEnv &)
Definition: oofrep1.cpp:1334
oofRepEditor encapsulates the factories for all the roles in editing reports and provides a single po...
Definition: oofrepeditor.h:38
Settings object for overriding behaviours of an instance of oofRep.
Definition: oofrep.h:173
void append(unsigned long)
Definition: oofarray.cpp:131
Specify a fixed-height band that contains a series of oofRepBlock's.
Definition: oofrep.h:1182
bool fieldIsNonEditable(unsigned short col) const
Definition: oofrep.h:2158
const oofColor & color() const
Definition: oofrep.h:2570
Abstract base for a fixed-size block drawn by an oofRepLayoutBand.
Definition: oofrep.h:1408
void append(oofRepBreak *adoptedBreak)
Definition: oofrep1.cpp:2077
Cross-platform specification of text style.
Definition: oofrep.h:732
Abstract report-writer drawing element.
Definition: oofrep.h:1681
virtual void next()=0
oofRepBandList & headers()
Definition: oofrep.h:2134
oofRepBandList mPageHeaders
Definition: oofrep.h:646
oofRepRender * mRender
Definition: oofrep.h:901
unsigned long startingPageNumber() const
Definition: oofrep.h:1926
virtual long leftDrawMargin() const
Definition: oofrep1.cpp:1431
Specify a block to draw field contents with some bracketing text in an oofRepLayoutBand.
Definition: oofrep.h:1550
Report elements that may have text style specified.
Definition: oofrep.h:790
unsigned long mVerticalPos
Definition: oofrep.h:651
virtual oofString signature() const =0
virtual dbView * view(unsigned short whichView=0) const
Request a dbView which may be the source of data for the item.
Definition: oofrep1.cpp:1253
virtual OOF_mixBandWithSubBands * asBandWithSubBands()
Definition: oofrep1.cpp:1554
virtual void endTableWrapper()
Definition: oofrep2.cpp:89
Base object to derive adorners from.
Definition: oofadorn.h:32
Creates XML environment and encapsulates other settings.
Definition: oofrep.h:150
Specify output to XML stream.
Definition: oofrpXML.h:57
bool more() const
Definition: oofarray.h:147
unsigned long bodyEnd()
Definition: oofrep.h:1955
void adoptRender(oofRepRender *adoptedRealRender)
Definition: oofrep.h:1837
std::ostream & operator<<(std::ostream &, const oofE_Base &)
oofRep * mRep
Definition: oofrep.h:546
virtual void describeLayout()
Definition: oofrep.h:822
virtual void start()
Definition: oofrep2.cpp:126
oofSizedDE(const oofRect &R)
Definition: oofrep.h:1716
virtual unsigned long minHeight()
Definition: oofrep1.cpp:1515
virtual void splitBandOverPage()
Definition: oofrep.h:426
virtual void changeTextStyle(oofRepTextStyle *)=0
oofRepBand * current()
Definition: oofrep.h:2308
oofRepBand * value(unsigned long) const
Definition: oofrep.h:2316
static oofRep * currentReport()
Definition: oofrep.h:2003
oofRepVisitor()
Definition: oofrep.h:486
Specify a block to draw mono-styled text in an oofRepLayoutBand.
Definition: oofrep.h:1445
oofRepBand * mBand
Definition: oofrep.h:1619
virtual void draw()
central default call for drawing, but still able to be overriden in extreme cases.
Definition: oofrep1.cpp:1296
oofRepSection * section(unsigned long) const
Definition: oofrep.h:2077
Base for adorners specifying borders for grids.
Definition: oofadorn.h:140
oofTextDE(int x, int y, const oofString &inStr)
Definition: oofrep.h:1736
virtual oofString MiddleText() const =0
virtual oofString text() const
Definition: oofrep2.cpp:915
bool reportAllowsEditing() const
Definition: oofrep.h:2049
Specify output to Comma-Separated-Values stream.
Definition: oofrpCSV.h:30
Specify a fixed height band to draw an oofPict.
Definition: oofrep.h:1649
List of blocks in an oofRepLayoutBand.
Definition: oofrep.h:336
std::ofstream * mOwnedofstream
Definition: oofrep.h:458
bool mNewPageEveryTime
Definition: oofrep.h:1620
Specify a fixed height band to draw a horizontal line black or grey in given thickness.
Definition: oofrep.h:1143
void decrementIteratingBandLevel()
Call when visiting tree enters band implementing OOF_mixIterableBand.
Definition: oofrep.h:2035
oofString mID
Definition: oofrep.h:902
unsigned long mBodyWidth
Definition: oofrep.h:651
Mixin for classes keeping an oofPict member.
Definition: oofdraw.h:269
oofRepBreakList mHeaderBreaks
Definition: oofrep.h:931
unsigned long count() const
Definition: oofrep.h:2464
Single page in a report writer preview window.
Definition: oofrep.h:1758
Specify output to Tab-Separated-Values stream.
Definition: oofrpTSV.h:31
Specify a block to draw an oofPict in an oofRepLayoutBand.
Definition: oofrep.h:1516
virtual ~oofRepTextStyle()
Definition: oofrep.h:738
void appendElement(oofDE *adoptedElement)
Definition: oofrep.h:2776
Specify output to MS Word-compatible Rich Text stream.
Definition: oofrpRTF.h:31
Specify a block to draw current page number with some bracketing text in an oofRepLayoutBand.
Definition: oofrep.h:1576
virtual ~oofDE()
Definition: oofrep.h:1683
oofString ID() const
Definition: oofrep.h:1848
oofString mTrailingText
Definition: oofrep.h:1508
unsigned long mPageWidth
Definition: oofrep.h:651
oofRepBreak * current()
Definition: oofrep.h:2487
virtual unsigned long fixedHeight()
Definition: oofrep.h:2169
Calculation attached to an oofRepBand.
Definition: oofrep.h:1604
unsigned long pageNumber() const
Definition: oofrep.h:1919
oofRepTextStyle * localTextStyle() const
Get style owned by this object.
Definition: oofrep.h:2654
virtual bool isMultiReport() const
Definition: oofrep1.cpp:438
virtual bool lastCol(unsigned long col)=0
#define OOFREP_EXPORT
Prefix for report writer classes to enable optional DLL linking.
Definition: oof0.h:189
oofRepBlock * current()
Definition: oofrep.h:2415
virtual void resumeBandOverPage()
Definition: oofrep.h:427
Base class for persistent fields in dbTable's.
Definition: oof3.h:63
unsigned long index() const
Definition: oofarray.h:133
Specify a band which provides a vertical gap on the page.
Definition: oofrep.h:1050
static std::ostream * sOut
Definition: oofrep.h:462
unsigned long value(unsigned long index) const
Definition: oofarray.cpp:243
Abstract base for report bands.
Definition: oofrep.h:1026
void clearID()
Definition: oofrep.h:1863
Wrapper for a report contained within an oofRepMulti.
Definition: oofrep.h:707
unsigned short nestedViewLevel() const
Definition: oofrep.h:2042
void draw(const oofRect &)
Definition: oofrep2.cpp:1448
List of Breaks attached to a report band.
Definition: oofrep.h:368
Provides searchable dictionary of common OOFILE classes like dbTable.
Definition: oof1.h:159
Abstract interface for database.
Definition: oof1.h:920
Cross-platform picture representation can load from file or resource and draw.
Definition: oofdraw.h:201
int height() const
Definition: oofrep.h:2839