fiWidget_design_style_values = typeWidget.GetField("design_style_values");
fiWidget_design_style_locations = typeWidget.GetField("design_style_locations");
fiWidget_design_iml_values = typeWidget.GetField("design_iml_values");
+ fiWidget_design_line = typeWidget.GetField("design_line");
+ fiWidget_design_column = typeWidget.GetField("design_column");
+ fiWidget_design_imlPath = typeWidget.GetField("design_imlPath");
+
//***********************************
fiWidget_slot = typeWidget.GetField("Slot");
if (hoverWidget != null && hoverWidget != currentWidget) {
//currentWidget.
RectangleD r = hoverWidget.GetScreenCoordinate() + Slot.Position + Parent.ClientRectangle.Position;
- //ctx.ResetClip();
- ctx.LineWidth = 1;
ctx.SetDash([1,3]);
- ctx.Rectangle(r.Inflated(2));
ctx.SetSource(Colors.Yellow);
- ctx.Stroke();
+ ctx.Rectangle(r, 1);
ctx.SetDash([]);
}
if (currentWidget != null) {
//currentWidget.
RectangleD r = currentWidget.GetScreenCoordinate() + Slot.Position + Parent.ClientRectangle.Position;
//ctx.ResetClip();
- ctx.LineWidth = 1.0;
//ctx.SetDash([2,3]);
- ctx.Rectangle(r.Inflated(1));
ctx.SetSource(Colors.White);
- ctx.Stroke();
+ ctx.Rectangle(r.Inflated(1), 1);
+// ctx.Stroke();
//ctx.SetDash([0]);
}
//crowIFaceService.UnlockRenderMutex();
internal static Type typeWidget;//, typeGroup, typeContainer, typeTemplatedContainer, typeTemplatedGroup;
//design mode members, present only if crow compiled with DESIGN_MODE enabled
internal static FieldInfo fiWidget_design_id, fiWidget_design_style_values, fiWidget_design_iml_values, fiWidget_design_style_locations,
+ fiWidget_design_line, fiWidget_design_column, fiWidget_design_imlPath,
fiWidget_slot;
Func<string> delGetName;
Func<Rectangle,Rectangle> delGetScreenCoordinates;
Type type;
object instance;
ForeignWidgetContainer parent;
- string designId;
+ string designId, designImlPath;
+ int designLine, designColumn;
public ForeignWidgetContainer(Type widgetType, object instance, ForeignWidgetContainer parent = null) {
type = widgetType;
this.instance = instance;
delGetScreenCoordinates = (Func<Rectangle,Rectangle>)Delegate.CreateDelegate(typeof(Func<Rectangle,Rectangle>), instance, type.GetMethod("ScreenCoordinates"));
designId = (string)fiWidget_design_id?.GetValue(instance);
-
+ designLine = (int)fiWidget_design_line?.GetValue(instance);
+ designColumn = (int)fiWidget_design_column?.GetValue(instance);
+ designImlPath = (string)fiWidget_design_imlPath?.GetValue(instance);
+
Console.WriteLine($"new ForeignWidgetContainer: {this} {parent}");
}
public string Icon => $"#icons.{type.FullName}.svg";
public string Name => delGetName();
public string DesignId => designId;
+ public string DesignPath => designImlPath;
+ public int DesignLine => designLine;
+ public int DesignColumn => designColumn;
public Rectangle GetScreenCoordinate() => delGetScreenCoordinates(Slot);
public Rectangle Slot => (Rectangle)fiWidget_slot?.GetValue(instance);
}
public string Name => pi.Name;
public object Value {
- get => pi.GetValue(host.Instance);
+ get {
+ if (IsSetByIML) {
+ return host.ImlValues[Name];
+ } else if (IsSetByStyling) {
+ return host.StyleValues[Name];
+ } else
+ return pi.GetValue(host.Instance);
+ }
set {
<Label Text="{TypeName}" Width="Stretched" TextAlignment="Left" />
<Label Font="mono bold, 16" Foreground="PaleGreen" Text="{DesignId}" Width="Fit" Margin="4" />
</HorizontalStack>
+ <HorizontalStack Height="Fit" Spacing="10" >
+ <Label Text="{DesignPath}" />
+ <Label Text="{DesignLine}" />
+ <Label Text="{DesignColumn}" />
+ </HorizontalStack>
<HorizontalStack Margin="1">
<Scroller Name="ItemsScroller" Margin="2">
<VerticalStack Height="Fit" MinimumSize="10,10"
+++ /dev/null
-/mnt/sdata/devel/CrowEdit/plugins/CEEbnfPlugin/CEEbnfPlugin.csproj -> AllItemsFullPathWithTargetPath
- /home/jp/.nuget/packages/glfw-sharp/0.2.15/content/glfw-sharp.dll.config
- CopyToOutputDirectory = PreserveNewest
- TargetPath = glfw-sharp.dll.config
- FullPath = /home/jp/.nuget/packages/glfw-sharp/0.2.15/content/glfw-sharp.dll.config
- RootDir = /
- Filename = glfw-sharp.dll
- Extension = .config
- RelativeDir = /home/jp/.nuget/packages/glfw-sharp/0.2.15/content/
- Directory = home/jp/.nuget/packages/glfw-sharp/0.2.15/content/
- RecursiveDir =
- Identity = /home/jp/.nuget/packages/glfw-sharp/0.2.15/content/glfw-sharp.dll.config
- ModifiedTime = 2024-07-10 07:28:58.0000000
- CreatedTime = 2024-07-10 07:28:58.0000000
- AccessedTime = 2025-03-04 12:31:37.7520082
- DefiningProjectFullPath = /usr/share/dotnet/sdk/9.0.200/Microsoft.Common.CurrentVersion.targets
- DefiningProjectDirectory = /usr/share/dotnet/sdk/9.0.200/
- DefiningProjectName = Microsoft.Common.CurrentVersion
- DefiningProjectExtension = .targets
}
protected override SyntaxAnalyser CreateSyntaxAnalyser() => new EbnfSyntaxAnalyser (this);
+ public override string GetTokenTypeString (TokenType tokenType) => ((EbnfTokenType)tokenType).ToString();
public override IList GetSuggestions (int absoluteTextPos, int currentTokenIndex, SyntaxNode CurrentNode, CharLocation loc) {
Token currentToken = GetTokenByIndex(currentTokenIndex);
if (xmlTokType == EbnfTokenType.OpenBracket || xmlTokType == EbnfTokenType.ClosingBracket)
return Colors.RebeccaPurple;
if (xmlTokType == EbnfTokenType.StringDelimiter)
- return Colors.DarkGoldenRod;
+ return Colors.Teal;
if (xmlTokType == EbnfTokenType.StringLiteral)
- return Colors.DarkGoldenRod;
+ return Colors.Teal;
+ if (xmlTokType.HasFlag(EbnfTokenType.CharMatch))
+ return Colors.Green;
+ if (xmlTokType.HasFlag(EbnfTokenType.Operator))
+ return Colors.Fuchsia;
if (xmlTokType.HasFlag (EbnfTokenType.Punctuation))
return Colors.DarkGrey;
switch (reader.Peek) {
case '/':
reader.Advance ();
- if (reader.TryRead ('*')) {
+ if (reader.TryPeek ('*')) {
+ reader.Advance ();
addTok (ref reader, EbnfTokenType.BlockCommentStart);
while (!reader.EndOfSpan) {
if (reader.Eol()) {
}
if (reader.TryPeek ("*/")) {
addTok (ref reader, EbnfTokenType.BlockComment);
- reader.Advance (3);
+ reader.Advance (2);
addTok (ref reader, EbnfTokenType.BlockCommentEnd);
break;
} else
reader.Read ();
- }
+ }
+ break;
}
+ addTok (ref reader, EbnfTokenType.Unknown);
break;
case '"':
case '\'':