EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CEXmlPlugin", "plugins\CEXmlPlugin\CEXmlPlugin.csproj", "{196D847E-D051-429B-892F-C405F036B8C2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "..\crow\Crow\Crow.csproj", "{5D8999F6-80D8-44CA-93F2-E18C9E44640C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "Crow\Crow\Crow.csproj", "{5D8999F6-80D8-44CA-93F2-E18C9E44640C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CENugetPlugin", "plugins\CENugetPlugin\CENugetPlugin.csproj", "{B0E09E4D-1907-46D4-B136-C7378A558201}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Debug|x64.Build.0 = Debug|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Debug|x86.Build.0 = Debug|Any CPU
{AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Release|x64.ActiveCfg = Release|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Release|x64.Build.0 = Release|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Release|x86.ActiveCfg = Release|Any CPU
+ {AAA67D93-458E-4DD7-9CDA-4EC7F73D47FF}.Release|x86.Build.0 = Release|Any CPU
{B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Debug|x64.Build.0 = Debug|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Debug|x86.Build.0 = Debug|Any CPU
{B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Release|x64.ActiveCfg = Release|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Release|x64.Build.0 = Release|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Release|x86.ActiveCfg = Release|Any CPU
+ {B8B5D071-097D-40A6-B1AE-3EC996D2E843}.Release|x86.Build.0 = Release|Any CPU
{1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Debug|x64.Build.0 = Debug|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Debug|x86.Build.0 = Debug|Any CPU
{1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Release|x64.ActiveCfg = Release|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Release|x64.Build.0 = Release|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Release|x86.ActiveCfg = Release|Any CPU
+ {1095C2F1-802F-4DE1-8035-EE0AAC4A5E35}.Release|x86.Build.0 = Release|Any CPU
{14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Debug|x64.Build.0 = Debug|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Debug|x86.Build.0 = Debug|Any CPU
{14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Release|x64.ActiveCfg = Release|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Release|x64.Build.0 = Release|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Release|x86.ActiveCfg = Release|Any CPU
+ {14E49365-6E22-4A27-B0E5-C6BBB347A85C}.Release|x86.Build.0 = Release|Any CPU
{93105D4F-3015-4C37-A377-9E4BD63DB582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93105D4F-3015-4C37-A377-9E4BD63DB582}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Debug|x64.Build.0 = Debug|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Debug|x86.Build.0 = Debug|Any CPU
{93105D4F-3015-4C37-A377-9E4BD63DB582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93105D4F-3015-4C37-A377-9E4BD63DB582}.Release|Any CPU.Build.0 = Release|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Release|x64.ActiveCfg = Release|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Release|x64.Build.0 = Release|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Release|x86.ActiveCfg = Release|Any CPU
+ {93105D4F-3015-4C37-A377-9E4BD63DB582}.Release|x86.Build.0 = Release|Any CPU
{196D847E-D051-429B-892F-C405F036B8C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{196D847E-D051-429B-892F-C405F036B8C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Debug|x64.Build.0 = Debug|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Debug|x86.Build.0 = Debug|Any CPU
{196D847E-D051-429B-892F-C405F036B8C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{196D847E-D051-429B-892F-C405F036B8C2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Release|x64.ActiveCfg = Release|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Release|x64.Build.0 = Release|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Release|x86.ActiveCfg = Release|Any CPU
+ {196D847E-D051-429B-892F-C405F036B8C2}.Release|x86.Build.0 = Release|Any CPU
{5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Debug|x64.Build.0 = Debug|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Debug|x86.Build.0 = Debug|Any CPU
{5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Release|x64.ActiveCfg = Release|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Release|x64.Build.0 = Release|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Release|x86.ActiveCfg = Release|Any CPU
+ {5D8999F6-80D8-44CA-93F2-E18C9E44640C}.Release|x86.Build.0 = Release|Any CPU
{B0E09E4D-1907-46D4-B136-C7378A558201}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0E09E4D-1907-46D4-B136-C7378A558201}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Debug|x64.Build.0 = Debug|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Debug|x86.Build.0 = Debug|Any CPU
{B0E09E4D-1907-46D4-B136-C7378A558201}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0E09E4D-1907-46D4-B136-C7378A558201}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Release|x64.ActiveCfg = Release|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Release|x64.Build.0 = Release|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Release|x86.ActiveCfg = Release|Any CPU
+ {B0E09E4D-1907-46D4-B136-C7378A558201}.Release|x86.Build.0 = Release|Any CPU
{22C1906B-BE08-4B31-AE02-2EE012CDA039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22C1906B-BE08-4B31-AE02-2EE012CDA039}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Debug|x64.Build.0 = Debug|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Debug|x86.Build.0 = Debug|Any CPU
{22C1906B-BE08-4B31-AE02-2EE012CDA039}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22C1906B-BE08-4B31-AE02-2EE012CDA039}.Release|Any CPU.Build.0 = Release|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Release|x64.ActiveCfg = Release|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Release|x64.Build.0 = Release|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Release|x86.ActiveCfg = Release|Any CPU
+ {22C1906B-BE08-4B31-AE02-2EE012CDA039}.Release|x86.Build.0 = Release|Any CPU
{CEE513F8-AE14-4588-8C9A-852455747A0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEE513F8-AE14-4588-8C9A-852455747A0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Debug|x64.Build.0 = Debug|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Debug|x86.Build.0 = Debug|Any CPU
{CEE513F8-AE14-4588-8C9A-852455747A0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEE513F8-AE14-4588-8C9A-852455747A0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Release|x64.ActiveCfg = Release|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Release|x64.Build.0 = Release|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Release|x86.ActiveCfg = Release|Any CPU
+ {CEE513F8-AE14-4588-8C9A-852455747A0B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="/mnt/sdata/devel/crow/Crow/Crow.csproj"/>
+ <ProjectReference Include="..\Crow\Crow\Crow.csproj"/>
<!--<PackageReference Include="Crow" Version="1.3.2-beta" />-->
<PackageReference Include="Crow.CairoBackend" Version="1.2.4-beta" />
</ItemGroup>
}
#endregion
protected abstract SyntaxAnalyser CreateSyntaxAnalyser ();
- public virtual Color GetColorForToken (Token token, SyntaxNode node = null)
+ public virtual TextFormatting GetColorForToken (Token token, SyntaxNode node = null)
{
TokenType tokType = token.Type;
if (tokType.HasFlag (TokenType.Punctuation))
}
}
public string CurFileName {
- get => string.IsNullOrEmpty (CurrentFilePath) ? _defaultFileName : Path.GetFileName (CurrentFilePath);
+ get => string.IsNullOrEmpty (CurrentFilePath) ? "" : Path.GetFileName (CurrentFilePath);
}
public string CurFileDir {
get => string.IsNullOrEmpty (CurrentFilePath) ? CurrentDir : Path.GetDirectoryName (CurrentFilePath);
measureTextBounds (gr);
}
}
- return Margin * 2 + (lt == LayoutingType.Height ? cachedTextSize.Height : cachedTextSize.Width);
+ return lt == LayoutingType.Height ? cachedTextSize.Height + 2 * Margin.Height : cachedTextSize.Width + 2 * Margin.Width;
} finally {
DbgLogger.EndEvent(DbgEvtType.GOMeasure);
}
public static Picture GetIcon (this MemberInfo mi)
=> mi is EventInfo ? new SvgPicture("#icons.event.svg") : new SvgPicture("#icons.property.svg");
public static Picture GetIcon (this SyntaxException se) => new SvgPicture("#icons.IconAlerte.svg");
+
+
}
}
measureTextBounds (gr);
}
}
- return Margin * 2 + (lt == LayoutingType.Height ? cachedTextSize.Height : cachedTextSize.Width + leftMargin);
+ return lt == LayoutingType.Height ? cachedTextSize.Height + 2 * Margin.Height : cachedTextSize.Width + leftMargin + 2 * Margin.Width;
} finally {
DbgLogger.EndEvent(DbgEvtType.GOMeasure);
}
gr.ShowText (buff);*/
} else
buff = sourceBytes.Slice (tok.Start, tok.Length);
- gr.SetSource (sourceDocument.GetColorForToken (tok));
+ gr.SetSource (sourceDocument.GetColorForToken (tok).Foreground);
int size = buff.Length * 4 + 1;
if (bytes.Length < size)
Rectangle r = new RectangleD(pixX, pixY, extents.Width, lineHeight);
r.Inflate(1);
gr.Rectangle(r);
- gr.SetSource(sourceDocument.GetColorForToken (tok).AdjustAlpha(0.5));
+ gr.SetSource(sourceDocument.GetColorForToken (tok).Foreground.AdjustAlpha(0.5));
gr.Stroke();
}
}
}
- public TextFormatting(Color fg, Color bg, bool _bold = false, bool _italic = false){
+ public TextFormatting(Color fg, Color bg = default, bool _bold = false, bool _italic = false){
Foreground = fg;
Background = bg;
Bold = _bold;
public override string ToString ()
=> $"{Foreground};{Background};{Bold};{Italic}";
+ public static implicit operator TextFormatting(Color color) => new TextFormatting(color);
+ public static implicit operator TextFormatting(Colors color) => new TextFormatting(color);
+
public static TextFormatting Parse (string str) {
string[] tmp = str.Split (';');
return new TextFormatting (Color.Parse (tmp[0]), Color.Parse (tmp[1]), bool.Parse (tmp[2]), bool.Parse (tmp[3]));
--- /dev/null
+// Copyright (c) 2013-2025 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
+using System.Diagnostics;
+using CrowEditBase;
+using System.Collections.Generic;
+
+namespace CECrowPlugin
+{
+ [DebuggerDisplay ("{Name}")]
+ public class CategoryContainer : CrowEditComponent
+ {
+ bool _isExpanded = true;
+
+ public readonly IEnumerable<PropertyContainer> Properties;
+ public readonly string Name;
+
+ public bool IsExpanded
+ {
+ get { return _isExpanded; }
+ set
+ {
+ if (value == _isExpanded)
+ return;
+
+ _isExpanded = value;
+
+ NotifyValueChanged ("IsExpanded", _isExpanded);
+ }
+ }
+
+ public CategoryContainer (string categoryName, IEnumerable<PropertyContainer> properties){
+ Name = categoryName;
+ Properties = properties;
+ }
+ }
+}
+
Type dbgIfaceType;
IList<ForeignWidgetContainer> graphicTree;
ForeignWidgetContainer currentWidget, hoverWidget;
-
+ internal Dictionary<string,IEnumerable<CategoryContainer>> crowTypesMembersCache = new Dictionary<string,IEnumerable<CategoryContainer>> (10);
public IList<ForeignWidgetContainer> GraphicTree {
get => graphicTree;
return false;
}
- crowLoadCtx = new AssemblyLoadContext("CrowDebuggerLoadContext");
+ crowLoadCtx = new AssemblyLoadContext("CrowDesignLoadContext");
crowAssembly = crowLoadCtx.LoadFromAssemblyPath (CrowDbgAssemblyLocation);
Type debuggerType = crowAssembly.GetType("Crow.DbgLogger");
while (true) {
bool mouseInChildren = false;
foreach(Widget child in GetWidgetChilren(editHoverWidget)) {
- if (child.MouseIsIn(MousePosition)) {
+ if (child != null && child.MouseIsIn(MousePosition)) {
editHoverWidget = child;
mouseInChildren = true;
break;
if (knownCrowWidgetTypes.ContainsKey (typeName))
return knownCrowWidgetTypes [typeName];
AssemblyLoadContext dbgLoadCtx =
- AssemblyLoadContext.All.FirstOrDefault (ctx=>ctx.Name == "CrowDebuggerLoadContext");
+ AssemblyLoadContext.All.FirstOrDefault (ctx=>ctx.Name == "CrowDesignLoadContext");
foreach (Assembly a in dbgLoadCtx.Assemblies) {
try {
foreach (Type expT in a.GetExportedTypes ()) {
MethodInfo mi = null;
AssemblyLoadContext dbgLoadCtx =
- AssemblyLoadContext.All.FirstOrDefault (ctx=>ctx.Name == "CrowDebuggerLoadContext");
+ AssemblyLoadContext.All.FirstOrDefault (ctx=>ctx.Name == "CrowDesignLoadContext");
foreach (Assembly a in dbgLoadCtx.Assemblies) {
try {
if (CompilerServices.TryGetExtensionMethods (a, t, methodName, out mi)) {
}
public Type GetTypeFromName (string typeName) {
AssemblyLoadContext dbgLoadCtx =
- AssemblyLoadContext.All.FirstOrDefault (ctx=>ctx.Name == "CrowDebuggerLoadContext");
+ AssemblyLoadContext.All.FirstOrDefault (ctx=>ctx.Name == "CrowDesignLoadContext");
foreach (Assembly a in dbgLoadCtx.Assemblies) {
try {
foreach (Type expT in a.GetExportedTypes ()) {
ForeignWidgetContainer parent;
string designId, designImlPath;
int designLine, designColumn;
+ CrowService srv;
public ForeignWidgetContainer(Type widgetType, object instance, ForeignWidgetContainer parent = null) {
type = widgetType;
this.instance = instance;
designImlPath = (string)fiWidget_design_imlPath?.GetValue(instance);
//onsole.WriteLine($"new ForeignWidgetContainer: {this} {parent} {designImlPath}");
+ srv = App.GetService<CrowService>();
}
Where (m=>((m is PropertyInfo pi && pi.CanWrite) || (m is EventInfo)) &&
m.GetCustomAttribute<XmlIgnoreAttribute>() == null);
- public IEnumerable<PropertyContainer> Properties => Members.Where(m=>m.MemberType == MemberTypes.Property).Select(p=> new PropertyContainer(this, p as PropertyInfo));
+ public IEnumerable<CategoryContainer> Properties {
+ get {
+ if (!srv.crowTypesMembersCache.ContainsKey(type.FullName)) {
+ srv.crowTypesMembersCache.Add (type.FullName, Members.Where(m=>m.MemberType == MemberTypes.Property)
+ .Select(p=> new PropertyContainer(this, p as PropertyInfo)).GroupBy(pc=>pc.DesignCategory).Select(g=>new CategoryContainer(g.Key, g.AsEnumerable())));
+ }
+ return srv.crowTypesMembersCache[type.FullName];
+ }
+ }
public string Icon => $"#icons.{type.FullName}.svg";
public string Name => delGetName();
return null;
}
- public override Color GetColorForToken(Token token, SyntaxNode node = null)
+ public override TextFormatting GetColorForToken(Token token, SyntaxNode node = null)
{
TokenType tokType = token.Type;
switch ((ImlTokenType)tokType) {
return null;
}
public override string GetTokenTypeString (TokenType tokenType) => ((StyleTokenType)tokenType).ToString();
- public override Color GetColorForToken(Token token, SyntaxNode node = null)
+ public override TextFormatting GetColorForToken(Token token, SyntaxNode node = null)
{
TokenType tokType = token.Type;
StyleTokenType xmlTokType = (StyleTokenType)tokType;
return pi.GetValue(host.Instance);
}
set {
-
-
+ Console.WriteLine(value);
}
}
/// <summary>
public bool IsSetByStyling => IsSetByIML ? false : HasStyling;
- public Color LabForeground => IsSetByIML ? Colors.Blue : HasStyling ? Colors.Black : Colors.Silver;
+ public Fill LabForeground => IsSetByIML ? Colors.Blue : HasStyling ? Colors.Black : Colors.Silver;
/// <summary>
/// reset to default value
--- /dev/null
+<?xml version="1.0"?>
+<Expandable Caption="{Name}" IsExpanded="{IsExpanded}" Background="Grey" Foreground="Black" BubbleEvents="All">
+ <Template>
+ <VerticalStack>
+ <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand" Background="Grey">
+ <Container Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+ MouseEnter="{Background=LightGrey}"
+ MouseLeave="{Background=Transparent}">
+ <Image
+ Path="#Crow.Icons.expandable.svg"
+ Visible="{./IsExpandable}"
+ SvgSub="{./IsExpanded}"/>
+ </Container>
+ <Label Foreground="White" Text="{./Caption}"/>
+ </HorizontalStack>
+ <Container Name="Content" Visible="false"/>
+ </VerticalStack>
+ </Template>
+ <VerticalStack Spacing="1" Height="Fit" Name="ItemsContainer"
+ Margin="0" VerticalAlignment="Top"/>
+</Expandable>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<ItemTemplate>
+ <ListItem Height="Fit" Width="Stretched" ContextCommands="{Commands}" DataSourceType="PropertyContainer"
+ Selected="{Background=${ControlHighlight}}"
+ Unselected="{Background=Transparent}">
+ <HorizontalStack>
+ <Label Width="50%" Text="{Name}" Foreground="LightGrey"/>
+ <TextBox Margin="1" Text="{²Value}" Height="Fit" Foreground = "{LabForeground}" Font="mono, 12" BubbleEvents="MouseWheel"/>
+ </HorizontalStack>
+ </ListItem>
+</ItemTemplate>
+<ItemTemplate DataType="System.Boolean" >
+ <ListItem Height="Fit" Width="Stretched" ContextCommands="{Commands}" DataSourceType="PropertyContainer"
+ Selected="{Background=${ControlHighlight}}"
+ Unselected="{Background=Transparent}">
+ <HorizontalStack>
+ <Label Width="50%" Text="{Name}" Foreground="LightGrey"/>
+ <CheckBox Background="White" Foreground="{LabForeground}" Height="Stretched" Caption="" IsChecked="{²Value}"
+ BubbleEvents="MouseWheel">
+ <Template>
+ <Image Style="Icon" Width="${ToggleIconSize}" Height="${ToggleIconSize}" Path="#Crow.Icons.checkbox.svg" SvgSub="{./IsChecked}"/>
+ </Template>
+ </CheckBox>
+ </HorizontalStack>
+ </ListItem>
+</ItemTemplate>
+<ItemTemplate Path="#CECrowPlugin.ui.CategoryExp.itemp" DataType="CECrowPlugin.CategoryContainer"
+ Data="Properties" DataTest="Type"/>
+<!--<ItemTemplate>
+ <HorizontalStack Style="MemberViewHStack" ContextCommands="{Commands}" DataSourceType="PropertyContainer">
+ <Label Style="MemberViewLabel" Text="{Name}" Foreground = "{LabForeground}"/>
+ <TextBox Margin="1" Text="{²Value}" Height="Fit" Foreground = "{LabForeground}"/>
+ </HorizontalStack>
+</ItemTemplate>
+
+<ItemTemplate Path="#ui.Enum.itemp" DataType="System.Enum" />
+<ItemTemplate Path="#ui.Enum.itemp" DataType="Style" />
+<ItemTemplate Path="#ui.Fill.itemp" DataType="Crow.Fill"/>-->
+
\ No newline at end of file
<?xml version="1.0"?>
<DockWindow Caption="Properties" Width="20%" Height="50%">
<VerticalStack RootDataLevel="true" DataSource="{CurrentWidget}">
- <ListBox Data="{Properties}">
+ <ListBox Data="{Properties}" DataTest="Type" ItemTemplate="#CECrowPlugin.ui.Properties.itemp">
<Template>
<VerticalStack Background="{./Background}">
<HorizontalStack Height="Fit" Spacing="10" Margin="10" Background="DimGrey">
</HorizontalStack>
</VerticalStack>
</Template>
- <ItemTemplate>
- <ListItem Height="Fit" Width="Stretched" ContextCommands="{Commands}"
- Selected="{Background=${ControlHighlight}}"
- Unselected="{Background=Transparent}">
- <HorizontalStack>
- <Label Width="50%" Text="{Name}" Foreground="LightGrey"/>
- <TextBox Margin="1" Text="{²Value}" Height="Fit" Foreground="{LabForeground}" Font="mono, 12"/>
- </HorizontalStack>
- </ListItem>
- </ItemTemplate>
</ListBox>
</VerticalStack>
</DockWindow>
return null;
}
- public override Color GetColorForToken(Token token, SyntaxNode node = null)
+ public override TextFormatting GetColorForToken(Token token, SyntaxNode node = null)
{
TokenType tokType = token.Type;
EbnfTokenType xmlTokType = (EbnfTokenType)tokType;
public string IntermediateOutputPath => project.GetProperty ("IntermediateOutputPath").EvaluatedValue;
public string OutputType => project.GetProperty ("OutputType").EvaluatedValue;
public string OutputAssembly =>
- Path.Combine (project.GetProperty ("TargetDir").EvaluatedValue, project.GetProperty ("TargetName").EvaluatedValue);
+ Path.Combine (project.GetPropertyValue ("OutputPath"), project.GetPropertyValue ("AssemblyName"));
public string AssemblyExtension => RuntimeInformation.IsOSPlatform (OSPlatform.Windows) ? ".exe" : "";
public OutputKind OutputKind {
get {
#endregion
public override string GetTokenTypeString (TokenType tokenType) => ((SyntaxKind)tokenType).ToString();
- public override Color GetColorForToken(Token token, SyntaxNode node = null)
+ public override TextFormatting GetColorForToken(Token token, SyntaxNode node = null)
{
if (node is CSToken cstok) {
Console.WriteLine($"=> {cstok.Parent}");
public override int measureRawSize (LayoutingType lt)
{
if (xmlDocument == null)
- return 2 * Margin;
+ return lt == LayoutingType.Width ? 2 * Margin.Width : 2 * Margin.Height;
if (pic == null)
load();
if (lt == LayoutingType.Width)
- return (int)(zoomFactor * pic.Dimensions.Width + 2 * Margin);
+ return (int)(zoomFactor * pic.Dimensions.Width + 2 * Margin.Width);
else
- return (int)(zoomFactor * pic.Dimensions.Height + 2 * Margin);
+ return (int)(zoomFactor * pic.Dimensions.Height + 2 * Margin.Height);
}
protected override void onDraw (IContext gr)
{
return null;
}
- public override Color GetColorForToken(Token token, SyntaxNode node = null)
+ public override TextFormatting GetColorForToken(Token token, SyntaxNode node = null)
{
TokenType tokType = token.Type;
XmlTokenType xmlTokType = (XmlTokenType)tokType;