// Copyright 2001-2002 Omni Development, Inc.  All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// http://www.omnigroup.com/DeveloperResources/OmniSourceLicense.html.
//
// $Header: /Network/Source/CVS/OmniGroup/Frameworks/OWF/CSS.subproj/OWCSSDeclarations.h,v 1.24 2002/03/09 01:53:48 kc Exp $

#import <OmniFoundation/OFObject.h>

typedef enum {
    // Background
    CSSBackgroundDeclarationIndex, CSSBackgroundAttachmentDeclarationIndex, CSSBackgroundColorDeclarationIndex, CSSBackgroundImageDeclarationIndex, CSSBackgroundPositionDeclarationIndex, CSSBackgroundRepeatDeclarationIndex,
    // Border
    CSSBorderDeclarationIndex, 
    CSSBorderColorDeclarationIndex, 
    CSSBorderStyleDeclarationIndex, 
    CSSBorderWidthDeclarationIndex,
    CSSBorderTopDeclarationIndex, CSSBorderTopColorDeclarationIndex, CSSBorderTopStyleDeclarationIndex, CSSBorderTopWidthDeclarationIndex, 
    CSSBorderRightDeclarationIndex, CSSBorderRightColorDeclarationIndex, CSSBorderRightStyleDeclarationIndex, CSSBorderRightWidthDeclarationIndex,
    CSSBorderBottomDeclarationIndex, CSSBorderBottomColorDeclarationIndex, CSSBorderBottomStyleDeclarationIndex, CSSBorderBottomWidthDeclarationIndex,
    CSSBorderLeftDeclarationIndex, CSSBorderLeftColorDeclarationIndex, CSSBorderLeftStyleDeclarationIndex, CSSBorderLeftWidthDeclarationIndex,
    // Bottom
    CSSBottomDeclarationIndex,
    // Clear
    CSSClearDeclarationIndex,
    // Color
    CSSColorDeclarationIndex,
    // Display
    CSSDisplayDeclarationIndex,
    // Float
    CSSFloatDeclarationIndex,
    // Font
    CSSFontDeclarationIndex, CSSFontFamilyDeclarationIndex, CSSFontSizeDeclarationIndex, CSSFontSizeAdjustDeclarationIndex, CSSFontStretchDeclarationIndex, CSSFontStyleDeclarationIndex, CSSFontVariantDeclarationIndex, CSSFontWeightDeclarationIndex,
    // Height
    CSSHeightDeclarationIndex,
    // Left
    CSSLeftDeclarationIndex,
    // Line
    CSSLineHeightDeclarationIndex,
    // Margin
    CSSMarginDeclarationIndex, CSSMarginBottomDeclarationIndex, CSSMarginLeftDeclarationIndex, CSSMarginRightDeclarationIndex, CSSMarginTopDeclarationIndex,
    // Padding
    CSSPaddingDeclarationIndex, CSSPaddingBottomDeclarationIndex, CSSPaddingLeftDeclarationIndex, CSSPaddingRightDeclarationIndex, CSSPaddingTopDeclarationIndex,
    // Position
    CSSPositionDeclarationIndex,
    // Right
    CSSRightDeclarationIndex,
    // Text
    CSSTextAlignDeclarationIndex, CSSTextDecorationDeclarationIndex, CSSTextIndentDeclarationIndex,
    // Top
    CSSTopDeclarationIndex,
    // Vertical-align
    CSSVerticalAlignDeclarationIndex,
    // Visibility
    CSSVisibilityDeclarationIndex, 
    // White-space
    CSSWhiteSpaceDeclarationIndex,
    // Width
    CSSWidthDeclarationIndex,
    // Z-index
    CSSZIndexDeclarationIndex,
    // Fini
    CSSDeclarationsCount
} CSSDeclarationIndexes;

typedef enum {
    CSSBorderOriginalIndex,
    CSSBorderColorIndex,
    CSSBorderStyleIndex,
    CSSBorderWidthIndex,
} CSSBorderDataIndices;

@interface OWCSSDeclarations : OFObject
{
@public
    id declarations[CSSDeclarationsCount];
    struct {
        unsigned int needsToStartABoxAtThisLevel:1;
    } flags;
}

+ (OWCSSDeclarations *)declarations;

// API
- (BOOL)isEmpty;
- (BOOL)isBlock;
- (BOOL)startsTable;
- (BOOL)hasFontDeclarations;
- (id)objectAtIndex:(unsigned int)index;
- (void)setObject:(id)object atIndex:(unsigned int)index;
- (void)addEntriesFromDeclarations:(OWCSSDeclarations *)otherDeclarations;
- (void)releaseAndClearDeclarations;

- (BOOL)needsToStartABoxAtThisLevel;
- (void)setNeedsToStartABoxAtThisLevel;

@end
