2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
// vim:cindent:ts=4:et:sw=4:
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* interface for the set of algorithms that determine column and table
|
2015-04-18 16:01:24 -07:00
|
|
|
* isizes
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsITableLayoutStrategy_h_
|
|
|
|
#define nsITableLayoutStrategy_h_
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsCoord.h"
|
|
|
|
|
2011-04-07 18:04:40 -07:00
|
|
|
class nsRenderingContext;
|
2007-03-22 10:30:00 -07:00
|
|
|
struct nsHTMLReflowState;
|
|
|
|
|
|
|
|
class nsITableLayoutStrategy
|
|
|
|
{
|
|
|
|
public:
|
2007-04-23 07:21:53 -07:00
|
|
|
virtual ~nsITableLayoutStrategy() {}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-07-24 10:03:25 -07:00
|
|
|
/** Implement nsIFrame::GetMinISize for the table */
|
|
|
|
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-07-24 10:03:25 -07:00
|
|
|
/** Implement nsIFrame::GetPrefISize for the table */
|
|
|
|
virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aComputingSize) = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-07-24 10:03:26 -07:00
|
|
|
/** Implement nsIFrame::MarkIntrinsicISizesDirty for the table */
|
|
|
|
virtual void MarkIntrinsicISizesDirty() = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2015-04-18 16:01:24 -07:00
|
|
|
* Compute final column isizes based on the intrinsic isize data and
|
|
|
|
* the available isize.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2015-04-18 16:01:24 -07:00
|
|
|
virtual void ComputeColumnISizes(const nsHTMLReflowState& aReflowState) = 0;
|
2008-09-24 10:14:35 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the type of table layout strategy, without the cost of
|
|
|
|
* a virtual function call
|
|
|
|
*/
|
|
|
|
enum Type { Auto, Fixed };
|
|
|
|
Type GetType() const { return mType; }
|
|
|
|
|
|
|
|
protected:
|
2014-08-31 20:36:37 -07:00
|
|
|
explicit nsITableLayoutStrategy(Type aType) : mType(aType) {}
|
2008-09-24 10:14:35 -07:00
|
|
|
private:
|
|
|
|
Type mType;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* !defined(nsITableLayoutStrategy_h_) */
|