From 819371cd4b13b34a3a3d68e73d2481d1cbb5d1dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 6 Jul 2020 08:18:33 +0200 Subject: [PATCH] list item --- Crow.sln | 7 + Crow/Crow.csproj | 2 +- Crow/Default.style | 17 +- Crow/Templates/ContextMenu.template | 5 +- Crow/Templates/DefaultItem.template | 9 +- Crow/Templates/DirectoryView.template | 69 +++-- Crow/Templates/FileItems.template | 28 +- Crow/Templates/GroupBox.template | 6 +- Crow/Templates/MenuItem.template | 46 +-- Crow/Templates/Tooltip.template | 4 +- Crow/src/DebugUtils/DbgEvent.cs | 237 ++++++++++++++ Crow/src/DebugUtils/DbgEventSource.cs | 34 ++ .../DbgEventTypeColors.cs | 4 +- Crow/src/DebugUtils/DbgEventWidget (copie).cs | 87 ++++++ Crow/src/DebugUtils/DbgWidgetRecord.cs | 50 +++ Crow/src/{debug => DebugUtils}/DebugLogger.cs | 3 +- Crow/src/DebugUtils/Utils.cs | 29 ++ .../src/EventArgs/SelectionChangeEventArgs.cs | 27 +- Crow/src/EventArgs/TreeExpandEventArg.cs | 18 ++ Crow/src/Fill/SolidColor.cs | 26 +- Crow/src/IML/Instantiator.cs | 10 +- Crow/src/Interface.cs | 39 ++- Crow/src/LayoutingQueueItem.cs | 2 +- Crow/src/Widgets/Expandable.cs | 27 +- Crow/src/Widgets/Group.cs | 20 +- Crow/src/Widgets/ListItem.cs | 42 +++ Crow/src/Widgets/PrivateContainer.cs | 7 + Crow/src/Widgets/TemplatedContainer.cs | 7 + Crow/src/Widgets/TemplatedControl.cs | 1 + Crow/src/Widgets/TemplatedGroup.cs | 141 ++++----- Crow/src/Widgets/TreeView.cs | 22 -- Crow/src/Widgets/Widget.cs | 52 +++- Samples/BasicTests/BasicTests.cs | 13 +- Samples/DebugLogAnalyzer/DbgEventWidget.cs | 143 +++++++++ .../DebugLogAnalyzer}/DbgLogViewer.cs | 291 +++++++++--------- .../DebugLogAnalyzer/DebugLogAnalyzer.csproj | 9 + Samples/DebugLogAnalyzer/Program.cs | 178 +++++++++++ .../Properties/AssemblyInfo.cs | 5 + .../ui/DbgEventTreeItems.itemp | 70 +++++ .../DebugLogAnalyzer/ui/DbgEvtTooltip.crow | 37 +++ Samples/DebugLogAnalyzer/ui/dbglog.crow | 98 ++++++ Samples/HelloWorld/HelloWorld.csproj | 15 +- Samples/HelloWorld/main.cs | 2 + Samples/ShowCase/ShowCase.cs | 14 +- Samples/common/SampleBase.cs | 74 +++++ Samples/common/samples.style | 4 +- Samples/common/ui/Interfaces/CheckBox2.imlt | 4 +- .../ui/Interfaces/Divers/classBindings.crow | 9 + .../common/ui/Interfaces/Divers/dbglog.crow | 99 ------ .../ui/Interfaces/Divers/splitter0.crow | 7 + Samples/common/ui/Interfaces/Splitter/1.crow | 30 -- Samples/common/ui/Interfaces/Splitter/3.crow | 44 --- Samples/common/ui/Interfaces/TabItem.template | 24 -- Samples/common/ui/Interfaces/colorItem.crow | 10 +- 54 files changed, 1613 insertions(+), 645 deletions(-) create mode 100644 Crow/src/DebugUtils/DbgEvent.cs create mode 100644 Crow/src/DebugUtils/DbgEventSource.cs rename Crow/src/{debug => DebugUtils}/DbgEventTypeColors.cs (96%) create mode 100644 Crow/src/DebugUtils/DbgEventWidget (copie).cs create mode 100644 Crow/src/DebugUtils/DbgWidgetRecord.cs rename Crow/src/{debug => DebugUtils}/DebugLogger.cs (98%) create mode 100644 Crow/src/DebugUtils/Utils.cs create mode 100644 Crow/src/EventArgs/TreeExpandEventArg.cs create mode 100644 Crow/src/Widgets/ListItem.cs create mode 100644 Samples/DebugLogAnalyzer/DbgEventWidget.cs rename {Crow/src/debug => Samples/DebugLogAnalyzer}/DbgLogViewer.cs (77%) create mode 100644 Samples/DebugLogAnalyzer/DebugLogAnalyzer.csproj create mode 100644 Samples/DebugLogAnalyzer/Program.cs create mode 100644 Samples/DebugLogAnalyzer/Properties/AssemblyInfo.cs create mode 100644 Samples/DebugLogAnalyzer/ui/DbgEventTreeItems.itemp create mode 100644 Samples/DebugLogAnalyzer/ui/DbgEvtTooltip.crow create mode 100644 Samples/DebugLogAnalyzer/ui/dbglog.crow create mode 100644 Samples/common/ui/Interfaces/Divers/classBindings.crow delete mode 100644 Samples/common/ui/Interfaces/Divers/dbglog.crow create mode 100644 Samples/common/ui/Interfaces/Divers/splitter0.crow delete mode 100644 Samples/common/ui/Interfaces/Splitter/1.crow delete mode 100644 Samples/common/ui/Interfaces/Splitter/3.crow delete mode 100644 Samples/common/ui/Interfaces/TabItem.template diff --git a/Crow.sln b/Crow.sln index a0113386..ee474496 100644 --- a/Crow.sln +++ b/Crow.sln @@ -27,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BasicTests", "Samples\Basic EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PerfTests", "Samples\PerfTests\PerfTests.csproj", "{18EBB41F-815E-4BF5-B80F-C9E2FAB2993A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DebugLogAnalyzer", "Samples\DebugLogAnalyzer\DebugLogAnalyzer.csproj", "{7915538F-B2B1-414C-95A3-1FC58E3286B9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -59,6 +61,10 @@ Global {18EBB41F-815E-4BF5-B80F-C9E2FAB2993A}.Debug|Any CPU.Build.0 = Debug|Any CPU {18EBB41F-815E-4BF5-B80F-C9E2FAB2993A}.Release|Any CPU.ActiveCfg = Release|Any CPU {18EBB41F-815E-4BF5-B80F-C9E2FAB2993A}.Release|Any CPU.Build.0 = Release|Any CPU + {7915538F-B2B1-414C-95A3-1FC58E3286B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7915538F-B2B1-414C-95A3-1FC58E3286B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7915538F-B2B1-414C-95A3-1FC58E3286B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7915538F-B2B1-414C-95A3-1FC58E3286B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -69,6 +75,7 @@ Global {91F1CE07-EECE-4F1D-A3EE-7239B563654A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} {7AEB6DD5-916E-4415-84E1-78EC6E5881CE} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} {18EBB41F-815E-4BF5-B80F-C9E2FAB2993A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} + {7915538F-B2B1-414C-95A3-1FC58E3286B9} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {00D4E149-7131-49F4-BAAD-559AA961A78E} diff --git a/Crow/Crow.csproj b/Crow/Crow.csproj index 38082c37..8a0b9434 100644 --- a/Crow/Crow.csproj +++ b/Crow/Crow.csproj @@ -32,7 +32,7 @@ full - $(DefineConstants);DEBUG_LOG;DEBUG;TRACE;DEBUG_LAYOUTING;DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE + $(DefineConstants);_DEBUG_LOG;DEBUG;TRACE;DEBUG_LAYOUTING;DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE true diff --git a/Crow/Default.style b/Crow/Default.style index 8bc81ea6..cbc9dcba 100644 --- a/Crow/Default.style +++ b/Crow/Default.style @@ -10,6 +10,10 @@ IconSize = "11"; IconMargin = "1"; ToggleIconSize = "16"; +TooltipBackground = "Khaki"; +TooltipForeground = "DimGrey"; +TooltipMargin = "3"; + WindowBackgroundColor = "DarkGrey"; WindowBorderColor = "Grey"; WindowBorderWidth = "1"; @@ -84,8 +88,8 @@ Menu { Height = "Fit"; Width = "Stretched"; VerticalAlignment = "Top"; - SelectionBackground = "${ControlHighlight}"; - SelectionColoring = "false"; + //SelectionBackground = "${ControlHighlight}"; + //SelectionColoring = "false"; } MenuItem { Caption = "MenuItem"; @@ -96,8 +100,13 @@ MenuItem { MouseEnter = "{Background=${ControlHighlight}}"; MouseLeave = "{Background=${MenuBackground}}"; //SelectionBackground = "${ControlHighlight}"; - SelectionBackground = "Transparent"; - SelectionColoring = "false"; + //SelectionBackground = "Transparent"; + //SelectionColoring = "false"; +} +ListItem { + //Selected = "{Background=${ControlHighlight}}"; + //Unselected = "{Background=Transparent}"; + //Margin="1"; } MessageBox { Background = "0.1,0.1,0.2,0.85"; diff --git a/Crow/Templates/ContextMenu.template b/Crow/Templates/ContextMenu.template index 7fc8dcc9..fda09d1f 100644 --- a/Crow/Templates/ContextMenu.template +++ b/Crow/Templates/ContextMenu.template @@ -1,7 +1,6 @@  + IsOpened ="true" Visible="{/IsOpened}" Background="Red"> - +