#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; using OSGeo.MapGuide.MaestroAPI.Resource; using Maestro.Editors; namespace Maestro.Base.Editor { public interface IEditorViewContent : IViewContent { /// /// Gets or sets the current resource being edited /// IEditorService EditorService { get; set; } /// /// Gets the current resource being edited /// IResource Resource { get; } /// /// Gets whether to discard unsaved changes when is called. If true, /// the normal user prompt to save unsaved changes is suppressed. /// bool DiscardChangesOnClose { get; } /// /// Closes this view /// /// indicates whether to discard any unsaved changes. void Close(bool discardChanges); /// /// Gets the XML content of the edited resource /// /// string GetXmlContent(); /// /// Indicates whether this current resource is a newly created resource /// bool IsNew { get; } /// /// Indicates whether this current resource can be edited with the xml editor /// bool CanEditAsXml { get; } /// /// Indicates whether this current resource can be profiled /// bool CanProfile { get; } /// /// Indicates whether this current resource can be validated /// bool CanBeValidated { get; } /// /// Indicates whether this current resource can be upgraded. /// bool CanUpgrade { get; } /// /// Indicates whether the resource being edited can be previewed /// bool CanBePreviewed { get; } /// /// Indicates whether the resource being edited has unsaved changes /// bool IsDirty { get; } /// /// Returns a URL that can be opened to preview this resource. If the /// property is false, this method should /// throw a /// /// /// string SetupPreviewUrl(string mapguideRootUrl); /// /// Raised when the value of changes /// event EventHandler DirtyStateChanged; /// /// Instructs the editor to write the in-memory edited resource back to the session /// repository. This is called before the edited resource is to be validated /// void SyncSessionCopy(); } }