layout/tables/nsITableLayoutStrategy.h
author B2G Bumper Bot <release+b2gbumper@mozilla.com>
Fri, 31 Jan 2014 14:05:12 -0800
changeset 182343 4c86e7c1f546598713e5e1565b033562b4ed2be8
parent 112525 80e4ab0d24bc64ceaa7693ab5def36faffde7a40
child 217653 beb29103be6902f7759bbcb7b9eb4e39fb0636dd
permissions -rw-r--r--
Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4188cf82dc3f Author: Miller Medeiros <miller@millermedeiros.com> Desc: Merge pull request #15630 from millermedeiros/803238-two-months-week-view Bug 803238 - Week view: If the text to display by default in the title (e.g. dow, month, year) exceeds the view length, use short names for day of week, month, year, etc r=gaye ======== https://hg.mozilla.org/integration/gaia-central/rev/41feabe49307 Author: Miller Medeiros <miller@millermedeiros.com> Desc: Bug 803238 - Week view: If the text to display by default in the title (e.g. dow, month, year) exceeds the view length, use short names for day of week, month, year, etc ======== https://hg.mozilla.org/integration/gaia-central/rev/c5b6fcb663c7 Author: Miller Medeiros <miller@millermedeiros.com> Desc: Merge pull request #15384 from millermedeiros/916411-long-title Bug 916411 - [fugu][Buri][Calendar]The event display abnormally when title/where/notes is long r=gaye ======== https://hg.mozilla.org/integration/gaia-central/rev/a1ecc59659e1 Author: millermedeiros <miller@millermedeiros.com> Desc: Bug 916411 - [fugu][Buri][Calendar]The event display abnormally when title/where/notes is long

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// vim:cindent:ts=4:et:sw=4:
/* 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/. */

/*
 * interface for the set of algorithms that determine column and table
 * widths
 */

#ifndef nsITableLayoutStrategy_h_
#define nsITableLayoutStrategy_h_

#include "nscore.h"
#include "nsCoord.h"

class nsRenderingContext;
struct nsHTMLReflowState;

class nsITableLayoutStrategy
{
public:
    virtual ~nsITableLayoutStrategy() {}

    /** Implement nsIFrame::GetMinWidth for the table */
    virtual nscoord GetMinWidth(nsRenderingContext* aRenderingContext) = 0;

    /** Implement nsIFrame::GetPrefWidth for the table */
    virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext,
                                 bool aComputingSize) = 0;

    /** Implement nsIFrame::MarkIntrinsicWidthsDirty for the table */
    virtual void MarkIntrinsicWidthsDirty() = 0;

    /**
     * Compute final column widths based on the intrinsic width data and
     * the available width.
     */
    virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) = 0;

    /**
     * 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:
    nsITableLayoutStrategy(Type aType) : mType(aType) {}
private:
    Type mType;
};

#endif /* !defined(nsITableLayoutStrategy_h_) */