#region License
// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
// This source code is made available under the terms of the GNU Lesser General Public License v3.0
// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
#endregion
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace MiniSqlQuery.Core
{
///
/// Core functions of the main MDI application host Form.
///
public interface IHostWindow
{
///
/// Gets a reference to the active child form.
///
/// The active form or null.
Form ActiveChildForm { get; }
///
/// Gets a reference to the database inspector window if open.
///
/// A object or null.
IDatabaseInspector DatabaseInspector { get; }
///
/// Gets the instance of the hosting form.
///
/// The host instance.
Form Instance { get; }
///
/// Gets a reference to the host windows tool strip control.
///
/// The window tool strip.
ToolStrip ToolStrip { get; }
///
/// Adds an to the plugins menu.
///
/// The command implementation to direct the name, image etc of the new menu item.
void AddPluginCommand() where TCommand : ICommand, new();
///
/// Adds a command based button to the tool strip by .
///
/// The command implementation to direct the name, image etc of the new tool strip item.
/// The position for the tool strip button, if null the item is appended to the end.
void AddToolStripCommand(int? index) where TCommand : ICommand, new();
///
/// Adds a seperator to the tool strip by .
///
/// The position for the seperator, if null the item is appended to the end.
void AddToolStripSeperator(int? index);
///
/// Displays the in the host window.
///
/// The child form to dock.
void DisplayDockedForm(DockContent frm);
///
/// Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and Help keyword.
///
/// The source form of the message.
/// The text to display in the message box.
/// The text to display in the title bar of the message box.
/// One of the values that specifies which buttons to display in the message box.
/// One of the values that specifies which icon to display in the message box.
/// One of the values that specifies the default button for the message box.
/// One of the values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
/// The path and name of the Help file to display when the user clicks the Help button.
/// The Help keyword to display when the user clicks the Help button.
/// One of the values.
/// is not a member of .-or- is not a member of .-or- The specified is not a member of .
/// An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property.
/// specified both and .-or- specified an invalid combination of .
DialogResult DisplayMessageBox(
Form source, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, string keyword);
///
/// Displays an "OK" message box with the specified text and caption.
///
/// The source form of the message.
/// The text to display in the message box.
/// The text to display in the title bar of the message box.
/// One of the values.
DialogResult DisplaySimpleMessageBox(Form source, string text, string caption);
///
/// Gets the relevent menu item by name.
///
/// The name of the menu to get, e.g. "Plugins" or "File" (no amphersand required).
/// The menu item object by .
ToolStripMenuItem GetMenuItem(string name);
/////
///// Plays the system beep.
/////
// void Beep();
///
/// A testable way to pass command line arguements to the application.
///
/// An array of command line arguements.
void SetArguments(string[] args);
///
/// Sets the application cursor to .
///
/// The new cursor mode.
void SetPointerState(Cursor cursor);
///
/// Sets the status text of the host.
///
/// The source form, for tracking MDI children.
/// The text to set.
void SetStatus(Form source, string text);
///
/// Sets the result count.
///
/// The source.
/// The count.
void SetResultCount(Form source, int? count);
///
/// Displays (and replaces if required) the database inspactor window.
///
/// The window to display.
/// The state for the window.
void ShowDatabaseInspector(IDatabaseInspector databaseInspector, DockState dockState);
///
/// Displays a "tool" window, like the database inspector etc.
///
/// The window to display, it must be a form.
/// The initial docking state of the window, e.g. .
void ShowToolWindow(DockContent form, DockState dockState);
}
}