24 #ifndef __ITableLayout__ 25 #define __ITableLayout__ 27 #include "TableTypes.h" 30 #include "ParcelKey.h" 31 #include "K2SmartPtr.h" 40 enum { kDefaultIID = IID_ITABLELAYOUT };
62 virtual bool16 operator !=(
const Parcel& other)
const = 0;
130 Row& operator=(
const Row& copy);
139 virtual bool16 operator !=(
const Row& other)
const = 0;
152 virtual bool16 GetIsFirstForRow()
const = 0;
155 virtual bool16 GetIsLastForRow()
const = 0;
203 virtual PMReal GetPathHeight()
const = 0;
217 virtual Parcel* GetNthParcel(int32 n)
const = 0;
218 virtual int32 GetParcelColIndex(GridCoord col)
const = 0;
244 virtual row_iterator
begin_row_iterator(GridCoord row, bool16 skipSubHeaders = kTrue)
const = 0;
254 virtual row_iterator
end_row_iterator(GridCoord row, bool16 skipSubHeaders = kTrue)
const = 0;
267 class row_iterator_helper;
272 typedef std::ptrdiff_t difference_type;
275 typedef std::bidirectional_iterator_tag iterator_category;
282 fHelper(copy.fHelper->copy())
287 fHelper.reset(copy.fHelper->copy());
291 Row& operator*()
const 292 {
return *(fHelper->dereference()); }
294 Row* operator->()
const 295 {
return fHelper->dereference(); }
299 fHelper->increment();
306 fHelper->increment();
312 fHelper->decrement();
319 fHelper->decrement();
324 {
return fHelper->equal(rhs.fHelper.get()); }
327 {
return !(*
this == rhs); }
345 virtual Row* dereference()
const = 0;
347 virtual void increment() = 0;
348 virtual void decrement() = 0;
373 virtual bool16 operator !=(
const Frame& other)
const = 0;
387 virtual bool16 GetIsLast()
const = 0;
415 virtual bool16 GetHasAnySubHeaderRows()
const = 0;
417 virtual bool16 GetIsASubHeaderRow(GridCoord mR)
const = 0;
419 virtual RowRange GetBodyRows()
const = 0;
421 virtual RowRange GetFooterRows()
const = 0;
423 virtual bool16 GetAreRowsInSameRange(GridCoord mR1,
424 GridCoord mR2)
const = 0;
440 virtual PMMatrix GetToParcelMatrix()
const = 0;
444 virtual PMMatrix GetToTextFrameMatrix()
const = 0;
448 virtual PMMatrix GetToPasteboardMatrix()
const = 0;
471 class frame_iterator;
473 virtual frame_iterator begin_frame_iterator()
const = 0;
475 virtual frame_iterator begin_frame_iterator(
UID tableFrameUID)
const = 0;
477 virtual frame_iterator end_frame_iterator()
const = 0;
479 virtual frame_iterator end_frame_iterator(
UID tableFrameUID)
const = 0;
482 class frame_iterator_helper;
487 typedef std::ptrdiff_t difference_type;
490 typedef std::bidirectional_iterator_tag iterator_category;
497 fHelper(copy.fHelper->copy())
502 fHelper.reset(copy.fHelper->copy());
506 Frame& operator*()
const 507 {
return *(fHelper->dereference()); }
509 Frame* operator->()
const 510 {
return fHelper->dereference(); }
514 fHelper->increment();
521 fHelper->increment();
527 fHelper->decrement();
534 fHelper->decrement();
539 {
return fHelper->equal(rhs.fHelper.get()); }
542 {
return !(*
this == rhs); }
560 virtual Frame* dereference()
const = 0;
562 virtual void increment() = 0;
563 virtual void decrement() = 0;
582 virtual GridCoord GetRowVMergeLast(GridCoord modelRow)
const = 0;
584 virtual GridCoord GetRowKeepsStart(GridCoord modelRow)
const = 0;
586 virtual GridCoord GetRowKeepsLast(GridCoord modelRow)
const = 0;
590 UID tableFrameUID)
const = 0;
646 const PMRect& invalRect) = 0;
654 bool16 isDamaged) = 0;
681 #endif //__ITableLayout__