1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // vim:cindent:ts=4:et:sw=4:
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 * interface for the set of algorithms that determine column and table
12 #ifndef nsITableLayoutStrategy_h_
13 #define nsITableLayoutStrategy_h_
18 class nsRenderingContext
;
19 struct nsHTMLReflowState
;
21 class nsITableLayoutStrategy
24 virtual ~nsITableLayoutStrategy() {}
26 /** Implement nsIFrame::GetMinISize for the table */
27 virtual nscoord
GetMinISize(nsRenderingContext
* aRenderingContext
) = 0;
29 /** Implement nsIFrame::GetPrefISize for the table */
30 virtual nscoord
GetPrefISize(nsRenderingContext
* aRenderingContext
,
31 bool aComputingSize
) = 0;
33 /** Implement nsIFrame::MarkIntrinsicISizesDirty for the table */
34 virtual void MarkIntrinsicISizesDirty() = 0;
37 * Compute final column widths based on the intrinsic width data and
38 * the available width.
40 virtual void ComputeColumnWidths(const nsHTMLReflowState
& aReflowState
) = 0;
43 * Return the type of table layout strategy, without the cost of
44 * a virtual function call
46 enum Type
{ Auto
, Fixed
};
47 Type
GetType() const { return mType
; }
50 explicit nsITableLayoutStrategy(Type aType
) : mType(aType
) {}
55 #endif /* !defined(nsITableLayoutStrategy_h_) */