Bumping manifests a=b2g-bump
[gecko.git] / layout / tables / nsITableLayoutStrategy.h
blob9972770b4c1decae4a599f712fd7fdcd9c706fce
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/. */
7 /*
8 * interface for the set of algorithms that determine column and table
9 * widths
12 #ifndef nsITableLayoutStrategy_h_
13 #define nsITableLayoutStrategy_h_
15 #include "nscore.h"
16 #include "nsCoord.h"
18 class nsRenderingContext;
19 struct nsHTMLReflowState;
21 class nsITableLayoutStrategy
23 public:
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;
36 /**
37 * Compute final column widths based on the intrinsic width data and
38 * the available width.
40 virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) = 0;
42 /**
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; }
49 protected:
50 explicit nsITableLayoutStrategy(Type aType) : mType(aType) {}
51 private:
52 Type mType;
55 #endif /* !defined(nsITableLayoutStrategy_h_) */