//----------------------------------------------------------------------- // // Copyright (c) 2009 Craig Sutherland. All rights reserved. // //----------------------------------------------------------------------- /* * Copyright (c) 2009 Craig Sutherland * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ namespace FastForward.WinCore { using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using ThoughtWorks.CruiseControl.Remote.Monitor; /// /// Defines a host for the plugins. /// public abstract class PluginHost { #region Public methods #region Show() /// /// Show the host. /// public abstract void Show(); #endregion #region ShutDown() /// /// Shut down the host. /// public abstract void ShutDown(); #endregion #region AddServerNode() /// /// Adds a new node for a server. /// /// The server the node is for. /// The new node. public abstract PluginServerNode AddServerNode(Server server); #endregion #region AddTab() /// /// Adds a new tab page. /// /// The new tab. public abstract PluginTab AddTab(Plugin plugin, string text); #endregion #region AddImage() /// /// Adds a new image. /// /// The image to add. /// The identifier of the image. public abstract string AddImage(Image image); #endregion #region ChangeSelectedControl() /// /// Change the currently selected control. /// /// The new control to be selected. public abstract void ChangeSelectedControl(Control control); #endregion #region ShowProjectContextMenu() /// /// Display the project context menu. /// /// The container for the menu. /// The x location. /// The y location. public abstract void ShowProjectContextMenu(Control container, int x, int y); #endregion #region AddCommand() /// /// Adds a new command. /// /// The text of the command. /// The icon of the command. /// The type of the command. /// The command to run. /// The new instance. public abstract PluginCommand AddCommand(string text, Image icon, PluginCommandType type, EventHandler command); #endregion #region GetSelectedProjects() /// /// Gets the currently selected projects. /// /// The selected projects. public abstract IEnumerable GetSelectedProjects(); #endregion #region PerformDefaultProjectAction() /// /// Performs the default project action on a project. /// /// The project to perform the action on. public abstract void PerformDefaultProjectAction(Project value); #endregion #endregion } }