File: Core\CSharp\System\Windows\Media\TextFormatting\TextParagraphProperties.cs
Project: wpf\src\PresentationCore.csproj (PresentationCore)
//-----------------------------------------------------------------------
//
//  Microsoft Windows Client Platform
//  Copyright (C) Microsoft Corporation
//
//  File:      TextParagraphProperties.cs
//
//  Contents:  Text paragraph properties
//
//  Spec:      http://team/sites/Avalon/Specs/Text%20Formatting%20API.doc
//
//  Created:   1-7-2005 Worachai Chaoweeraprasit (wchao)
//
//------------------------------------------------------------------------
 
 
using System;
using System.Collections.Generic;
using System.Windows;
using MS.Internal.PresentationCore;
 
 
namespace System.Windows.Media.TextFormatting
{
    /// <summary>
    /// Properties that can change from one paragraph to the next, such as 
    /// text flow direction, text alignment, or indentation.
    /// </summary>
    public abstract class TextParagraphProperties
    {
        /// <summary>
        /// This property specifies whether the primary text advance 
        /// direction shall be left-to-right, right-to-left, or top-to-bottom.
        /// </summary>
        public abstract FlowDirection FlowDirection
        { get; }
 
 
        /// <summary>
        /// This property describes how inline content of a block is aligned.
        /// </summary>
        public abstract TextAlignment TextAlignment
        { get; }
 
 
        /// <summary>
        /// Paragraph's line height
        /// </summary>
        public abstract double LineHeight
        { get; }
 
 
        /// <summary>
        /// Indicates the first line of the paragraph.
        /// </summary>
        public abstract bool FirstLineInParagraph
        { get; }
 
 
        /// <summary>
        /// If true, the formatted line may always be collapsed. If false (the default),
        /// only lines that overflow the paragraph width are collapsed.
        /// </summary>
        public virtual bool AlwaysCollapsible
        {
            get { return false; }
        }
 
 
        /// <summary>
        /// Paragraph's default run properties
        /// </summary>
        public abstract TextRunProperties DefaultTextRunProperties
        { get; }
 
 
        /// <summary>
        /// If not null, text decorations to apply to all runs in the line. This is in addition
        /// to any text decorations specified by the TextRunProperties for individual text runs.
        /// </summary>
        public virtual TextDecorationCollection TextDecorations
        {
            get { return null; }
        }
 
 
        /// <summary>
        /// This property controls whether or not text wraps when it reaches the flow edge 
        /// of its containing block box 
        /// </summary>
        public abstract TextWrapping TextWrapping
        { get; }
 
 
        /// <summary>
        /// This property specifies marker characteristics of the first line in paragraph
        /// </summary>
        public abstract TextMarkerProperties TextMarkerProperties
        { get; }
 
 
        /// <summary>
        /// Line indentation
        /// </summary>
        public abstract double Indent
        { get; }
 
 
        /// <summary>
        /// Paragraph indentation
        /// </summary>
        public virtual double ParagraphIndent
        {
            get { return 0; }
        }
 
 
        /// <summary>
        /// Default Incremental Tab
        /// </summary>
        public virtual double DefaultIncrementalTab
        {
            get { return 4 * DefaultTextRunProperties.FontRenderingEmSize; }
        }
 
 
        /// <summary>
        /// Collection of tab definitions
        /// </summary>
        public virtual IList<TextTabProperties> Tabs
        {
            get { return null; }
        }
 
 
        /// <summary>
        /// Lexical component providing hyphenation opportunity.
        /// </summary>
#if HYPHENATION_API
        public virtual TextLexicalService Hyphenator
        {
            get { return null; }
        }
#else
        private TextLexicalService  _hyphenator;
        internal virtual TextLexicalService Hyphenator
        {
            [FriendAccessAllowed]   // used by Framework
            get { return _hyphenator; }
 
            [FriendAccessAllowed]   // used by Framework
            set { _hyphenator = value; }
        }
#endif
    }
}