#region Disclaimer / License
// Copyright (C) 2011, 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 Disclaimer / License
using System;
namespace Maestro.Shared.UI
{
///
/// A method that creates an object of the given type
///
///
///
public delegate T CreateFunc();
///
/// Manages instances
///
public interface IViewContentManager
{
///
/// Hides the given single-instance view content
///
/// The type implementing the interface
void HideContent() where T : IViewContent;
///
/// Initializes this instance
///
void Initialize();
///
/// Gets whether the given single-instance view content type has already been created
///
/// The type implementing the interface
///
bool IsCreated() where T : IViewContent;
///
/// Creates and/or opens the given view content in the specified region
///
/// The type implementing the interface
/// The desired region to show the view content in
/// A method that will create the required view content the view content has not been created yet
///
T OpenContent(ViewRegion region, CreateFunc method) where T : IViewContent;
///
/// Creates and/or opens the given view content in the specified region
///
/// The type implementing the interface
/// The desired region to show the view content in
///
T OpenContent(ViewRegion region) where T : IViewContent;
///
/// Creates and/or opens the given view content in the specified region
///
/// The type implementing the interface
///
///
/// The desired region to show the view content in
/// A method that will create the required view content the view content has not been created yet
///
T OpenContent(string title, string description, ViewRegion region, CreateFunc method) where T : IViewContent;
///
/// Creates and/or opens the given view content in the specified region
///
/// The type implementing the interface
///
///
/// The desired region to show the view content in
///
T OpenContent(string title, string description, ViewRegion region) where T : IViewContent;
///
/// Displays the given single-instance view content
///
/// The type implementing the interface
void ShowContent() where T : IViewContent;
///
/// Raised when a view is hidden
///
event EventHandler ViewHidden;
}
}