pascalabcnet/PluginsSupportLinux/Classes.cs
Mikhalkovich Stanislav 3072383106 Для Linux-версии исправлен DockContent, редактор (показ всплывающего окна)
Сделан новый проект VisualPABCLinux
И пришлось склонировать PluginsSupport, поскольку он вносит зависимость по редактору
Компоненты WeifenLuo для Linux надо после перекомпиляции скопировать в Libraries - подшить их к основному проекту просто не получилось
2022-06-30 09:47:11 +03:00

69 lines
2.2 KiB
C#

// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Drawing;
namespace VisualPascalABCPlugins
{
public delegate void PluginGUIItemExecuteDelegate();
public class PluginGUIItem : IPluginGUIItem
{
string text;
string hint;
Image image;
Color imageTransparentColor;
PluginGUIItemExecuteDelegate executeDelegate;
System.Windows.Forms.Keys shortcutKeys = System.Windows.Forms.Keys.None;
string shortcutKeyDisplayString = null;
public PluginGUIItem(string text, string hint, Image image, Color imageTransparentColor, PluginGUIItemExecuteDelegate executeDelegate)
{
this.text = text;
this.hint = hint;
this.image = image;
this.imageTransparentColor = imageTransparentColor;
this.executeDelegate = executeDelegate;
}
public PluginGUIItem(string text, string hint, Image image, Color imageTransparentColor, PluginGUIItemExecuteDelegate executeDelegate, System.Windows.Forms.Keys shortcutKeys, string shortcutKeyDisplayString)
{
this.text = text;
this.hint = hint;
this.image = image;
this.imageTransparentColor = imageTransparentColor;
this.executeDelegate = executeDelegate;
this.shortcutKeys = shortcutKeys;
this.shortcutKeyDisplayString = shortcutKeyDisplayString;
}
public string Text
{
get { return text; }
}
public string Hint
{
get { return hint; }
set { hint = value; }
}
public Image Image
{
get { return image; }
}
public Color ImageTransparentColor
{
get { return imageTransparentColor; }
}
public void Execute()
{
executeDelegate();
}
public System.Windows.Forms.Keys ShortcutKeys
{
get { return shortcutKeys; }
}
public string ShortcutKeyDisplayString
{
get { return shortcutKeyDisplayString; }
}
}
}