#region Disclaimer / License // Copyright (C) 2010, Jackie Ng // http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie@gmail.com // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // #endregion using System; using System.Collections.Generic; using System.Text; using OSGeo.MapGuide.MaestroAPI.Resource; using System.Drawing; using System.ComponentModel; namespace OSGeo.MapGuide.ObjectModels.PrintLayout { /// /// Print Layouts /// public interface IPrintLayout : IResource { /// /// Gets the page properties. /// /// The page properties. IPrintLayoutPageProperties PageProperties { get; } /// /// Gets the layout properties. /// /// The layout properties. IPrintLayoutProperties LayoutProperties { get; } /// /// Creates the size of the logo. /// /// The width. /// The height. /// The units. /// ISize CreateLogoSize(float width, float height, string units); /// /// Creates the font. /// /// The name. /// The height. /// The units. /// IFont CreateFont(string name, float height, string units); /// /// Creates the logo position. /// /// The left. /// The bottom. /// The units. /// IPosition CreateLogoPosition(float left, float bottom, string units); /// /// Creates the text position. /// /// The left. /// The bottom. /// The units. /// IPosition CreateTextPosition(float left, float bottom, string units); /// /// Gets the custom logos. /// /// The custom logos. IEnumerable CustomLogos { get; } /// /// Creates the logo. /// /// The symbol library id. /// Name of the symbol. /// The size. /// The position. /// ILogo CreateLogo(string symbolLibraryId, string symbolName, ISize size, IPosition position); /// /// Adds the logo. /// /// The logo. void AddLogo(ILogo logo); /// /// Removes the logo. /// /// The logo. void RemoveLogo(ILogo logo); /// /// Gets the custom text elements. /// /// The custom text elements. IEnumerable CustomText { get; } /// /// Creates the text element. /// /// The value. /// The font. /// The text. /// IText CreateText(string value, IFont font, IPosition text); /// /// Adds the text. /// /// The text. void AddText(IText text); /// /// Removes the text. /// /// The text. void RemoveText(IText text); } /// /// Page properties of the print layout /// public interface IPrintLayoutPageProperties : INotifyPropertyChanged { /// /// Gets or sets the color of the background. /// /// The color of the background. Color BackgroundColor { get; set; } } /// /// Layout properties of the print layout /// public interface IPrintLayoutProperties : INotifyPropertyChanged { /// /// Gets or sets a value indicating whether [show title]. /// /// true if [show title]; otherwise, false. bool ShowTitle { get; set; } /// /// Gets or sets a value indicating whether [show legend]. /// /// true if [show legend]; otherwise, false. bool ShowLegend { get; set; } /// /// Gets or sets a value indicating whether [show scale bar]. /// /// true if [show scale bar]; otherwise, false. bool ShowScaleBar { get; set; } /// /// Gets or sets a value indicating whether [show north arrow]. /// /// true if [show north arrow]; otherwise, false. bool ShowNorthArrow { get; set; } /// /// Gets or sets a value indicating whether [show URL]. /// /// true if [show URL]; otherwise, false. bool ShowURL { get; set; } /// /// Gets or sets a value indicating whether [show date time]. /// /// true if [show date time]; otherwise, false. bool ShowDateTime { get; set; } /// /// Gets or sets a value indicating whether [show custom logos]. /// /// true if [show custom logos]; otherwise, false. bool ShowCustomLogos { get; set; } /// /// Gets or sets a value indicating whether [show custom text]. /// /// true if [show custom text]; otherwise, false. bool ShowCustomText { get; set; } } /// /// Represents a position /// public interface IPosition : INotifyPropertyChanged { /// /// Gets or sets the left margin. /// /// The left margin. float Left { get; set; } /// /// Gets or sets the bottom margin. /// /// The bottom margin. float Bottom { get; set; } /// /// Gets or sets the units. /// /// The units. string Units { get; set; } } /// /// Represents a size /// public interface ISize : INotifyPropertyChanged { /// /// Gets or sets the width. /// /// The width. float Width { get; set; } /// /// Gets or sets the height. /// /// The height. float Height { get; set; } /// /// Gets or sets the units. /// /// The units. string Units { get; set; } } /// /// Represents a logo /// public interface ILogo : INotifyPropertyChanged { /// /// Gets the position. /// /// The position. IPosition Position { get; } /// /// Gets or sets the resource id. /// /// The resource id. string ResourceId { get; set; } /// /// Gets or sets the name. /// /// The name. string Name { get; set; } /// /// Gets the size. /// /// The size. ISize Size { get; } /// /// Gets or sets the rotation. /// /// The rotation. float? Rotation { get; set; } } /// /// Represents a font /// public interface IFont : INotifyPropertyChanged { /// /// Gets or sets the name. /// /// The name. string Name { get; set; } /// /// Gets or sets the height. /// /// The height. float Height { get; set; } /// /// Gets or sets the units. /// /// The units. string Units { get; set; } } /// /// Represents a text element /// public interface IText : INotifyPropertyChanged { /// /// Gets the position. /// /// The position. IPosition Position { get; } /// /// Gets the font. /// /// The font. IFont Font { get; } /// /// Gets or sets the value. /// /// The value. string Value { get; set; } } }