diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2025-07-16 20:08:03 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2025-07-16 20:08:03 +0200 |
| commit | 149205e8ebe5c4ab1ca52ca700ff754aabdf14aa (patch) | |
| tree | e0d567ae9a304ec915e49a25e42af1803e3d83ed /Samples/common | |
| parent | e96fecb4bb512ee47e9df0224e779b24d686bc30 (diff) | |
DebugLogViewer, DockTests
Diffstat (limited to 'Samples/common')
| -rw-r--r-- | Samples/common/samples.style | 8 | ||||
| -rw-r--r-- | Samples/common/src/SampleBaseForEditor.cs | 17 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Divers/all.crow | 2 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Experimental/tabviewTestVertical2.crow | 2 | ||||
| -rw-r--r-- | Samples/common/ui/debugLog/DebugLog.crow | 5 | ||||
| -rw-r--r-- | Samples/common/ui/debugLog/dbg.style | 52 | ||||
| -rw-r--r-- | Samples/common/ui/templates/dockwinsimple.itmp | 7 |
7 files changed, 74 insertions, 19 deletions
diff --git a/Samples/common/samples.style b/Samples/common/samples.style index 4fbe0293..a82b9a85 100644 --- a/Samples/common/samples.style +++ b/Samples/common/samples.style @@ -3,8 +3,8 @@ InactiveTabBackground = "DarkGrey"; SelectedTabBackground = "Onyx"; InactiveTabForeground = "Grey"; SelectedTabForeground = "White"; -SmallUIFont = "sans, 12"; -SmallFont = "consolas, 12"; +SmallUIFont = "sans, 20"; +SmallFont = "mono, 20"; FpsLabel { Width = "30"; @@ -69,7 +69,7 @@ DockStack { //EndDrag="{Background=Jet}"; } SimpleDockWin { - Template= "#ui.dockwinsimple.itmp"; + //Template= "#ui.dockwinsimple.itmp"; Background = "Yellow"; Width="200"; Height="200"; @@ -91,7 +91,7 @@ valignStyle2 { //Initialized="{Background=Blue}"; } smallLabel { - Font="consolas, 8"; + Font="mono, 8"; } suggestionsListBox { Template = "#ui.Suggestions.template"; diff --git a/Samples/common/src/SampleBaseForEditor.cs b/Samples/common/src/SampleBaseForEditor.cs index b97982e6..3133286f 100644 --- a/Samples/common/src/SampleBaseForEditor.cs +++ b/Samples/common/src/SampleBaseForEditor.cs @@ -5,15 +5,11 @@ using System; using Crow; using System.IO; -using System.Text; -using Crow.IML; -using System.Runtime.CompilerServices; using Glfw; -using System.Diagnostics; using Crow.Text; using System.Collections.Generic; using Encoding = System.Text.Encoding; -using System.Linq; +using Crow.DebugLogger; namespace Samples { @@ -69,9 +65,10 @@ namespace Samples } } - #region DebugLog + #region DebugLog bool debugLogRecording; public bool DebugLoggingEnabled => DbgLogger.IsEnabled; + public IEnumerable<DbgEvent> DebugEvents => DbgLogger.Events; static ObservableList<DbgEvtType> RecordedEvents; public bool DebugLogRecording { @@ -80,11 +77,6 @@ namespace Samples if (debugLogRecording == value) return; debugLogRecording = value; - if (debugLogRecording) { - DbgLogger.IncludedEvents = new List<DbgEvtType>(RecordedEvents); - } else { - DbgLogger.IncludedEvents = null; - } NotifyValueChanged(debugLogRecording); } } @@ -107,6 +99,9 @@ namespace Samples NotifyValueChanged (DebugLogFilePath); } } + + + #endregion diff --git a/Samples/common/ui/Interfaces/Divers/all.crow b/Samples/common/ui/Interfaces/Divers/all.crow index e59d30d5..2d1601aa 100644 --- a/Samples/common/ui/Interfaces/Divers/all.crow +++ b/Samples/common/ui/Interfaces/Divers/all.crow @@ -7,7 +7,7 @@ <Button /> <CheckBox /> <RadioButton/> - <Spinner/> + <Spinner/> <Slider /> <Popper /> <Expandable /> diff --git a/Samples/common/ui/Interfaces/Experimental/tabviewTestVertical2.crow b/Samples/common/ui/Interfaces/Experimental/tabviewTestVertical2.crow index d1f24c4f..c13c9e8b 100644 --- a/Samples/common/ui/Interfaces/Experimental/tabviewTestVertical2.crow +++ b/Samples/common/ui/Interfaces/Experimental/tabviewTestVertical2.crow @@ -15,7 +15,7 @@ <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Icons.exit2.svg" MouseClick="onQuitPress"/> </Border> - </HorizontalStack> + </HorizontalStack> </ListItem> </ItemTemplate> </ListBox> diff --git a/Samples/common/ui/debugLog/DebugLog.crow b/Samples/common/ui/debugLog/DebugLog.crow new file mode 100644 index 00000000..cc721d6b --- /dev/null +++ b/Samples/common/ui/debugLog/DebugLog.crow @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<Window Width="1000" Height="600" Caption="Debug Log" Background="0.1,0.1,0.1,0.8"> + <ListBox Data="{DebugEvents}"> + </ListBox> +</Window>
\ No newline at end of file diff --git a/Samples/common/ui/debugLog/dbg.style b/Samples/common/ui/debugLog/dbg.style new file mode 100644 index 00000000..20500606 --- /dev/null +++ b/Samples/common/ui/debugLog/dbg.style @@ -0,0 +1,52 @@ +ControlBackground = "Transparent"; +ControlForeground = "Grey"; +ControlHighlight = "RoyalBlue"; +ControlBorderColor = "DimGrey"; +ControlBorderWidth = "1"; +ControlCaptionHoverColor = "White"; +ControlCornerRadius = "0"; +ControlInsideMargin = "1"; +ControlIdle = "Jet"; + +smallLabCaption { + Font="mono, 10"; + Foreground="Grey"; +} +smallLabValue { + Font="mono, 10"; + Foreground="White"; +} +DbgLogViewer { + MouseWheelSpeed="3"; + Font="mono, 8"; + Background="Onyx"; + CacheEnabled = "true"; +} +DbgEventView { + Height="Fit"; + Width="150"; +} +labWidgetRecordList { + Font="mono, 11"; + Background="Grey"; + Foreground="Jet"; + Margin="0"; + Width="24"; + TextAlignment="Right"; +} + +DbgEventWidget { + CacheEnabled = "true"; +} +CheckBoxEvtType { + Template= "#Crow.CheckBox2.template"; + Width = "160"; + Height = "Fit"; + CornerRadius = "2"; + Background = "${ControlIdle}"; + Foreground = "${ControlForeground}"; + Checked = "{Background=${ControlHighlight}}"; + Unchecked = "{Background=${ControlIdle}}"; + MouseEnter = "{Foreground=${ControlCaptionHoverColor}}"; + MouseLeave = "{Foreground=${ControlForeground}}"; +}
\ No newline at end of file diff --git a/Samples/common/ui/templates/dockwinsimple.itmp b/Samples/common/ui/templates/dockwinsimple.itmp index fa0e27e7..0ad22e0e 100644 --- a/Samples/common/ui/templates/dockwinsimple.itmp +++ b/Samples/common/ui/templates/dockwinsimple.itmp @@ -1,4 +1,7 @@ <?xml version="1.0"?> -<VerticalStack CacheEnabled="false" Name="MoveHandle" Background="{./Background}"> - <Label CacheEnabled="false" Background="Jet" Text="{./DockingPosition}"/> +<VerticalStack Name="MoveHandle" Background="{./Background}"> + <Label Background="Jet" Text="{./DockingPosition}"/> + <TextBox Background="Jet" Text="{./Name}" Width="Stretched" Multiline="true"/> + <Label Background="Jet" Text="{./FloatingGroup}"/> + <Label Background="Jet" Text="{./Width}"/> </VerticalStack> |