diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-04-15 06:28:27 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-04-15 06:28:27 +0200 |
| commit | 412e93ade521562145cf602cd340c4485fa15e37 (patch) | |
| tree | 3f62500e2698bce844937ec36349dc2dc917dd50 /Samples/DebugLogAnalyzer/ui | |
| parent | a08929b22ac6b6371585beec221c3efebc3b8a71 (diff) | |
wip
Diffstat (limited to 'Samples/DebugLogAnalyzer/ui')
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/ComboBox.template | 30 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/DbgEventTreeItems.itemp | 2 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/DbgEventView.template | 43 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/DebugLog.crow | 89 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/WidgetRecord.itemp | 11 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/dbg.style | 21 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/dockWindows/winLogGraph.crow | 15 | ||||
| -rw-r--r-- | Samples/DebugLogAnalyzer/ui/main.crow | 12 |
8 files changed, 161 insertions, 62 deletions
diff --git a/Samples/DebugLogAnalyzer/ui/ComboBox.template b/Samples/DebugLogAnalyzer/ui/ComboBox.template new file mode 100644 index 00000000..1b8e439c --- /dev/null +++ b/Samples/DebugLogAnalyzer/ui/ComboBox.template @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<HorizontalStack Spacing="5" Background="{./Background}"> + <Label Text="{./Caption}"/> + <Popper Caption="{./SelectedItem}" Name="popper" PopDirection="Bottom" Foreground="{./Foreground}" Background="{./Background}"> + <Template> + <CheckBox Caption="{./Caption}" IsChecked="{²./IsPopped}" Foreground="{./Foreground}" Background="{./Background}"> + <Template> + <Border Style="ControlBorder" Background="{./Background}"> + <HorizontalStack Margin="0" Spacing="1"> + <TextBox Style="ControlEditableText" Text="{./Caption}"/> + <Shape Style="ArrowBut" MouseDown="./onScrollForth" Width="10" Height="Stretched" + Size="10,10" Path="M 0.5,0.5 L 9.5,0.5 L 4.5,9.5 Z F"/> + </HorizontalStack> + </Border> + </Template> + </CheckBox> + </Template> + <Border Background="Onyx" Foreground="DimGrey" BorderWidth="1" Margin="1" Height="Fit" Width="Fit" + MinimumSize="{../../MinimumPopupSize}" > + <Scroller Name="scroller1" Margin="1" + MaximumSize="0,200" + HorizontalAlignment="Left"> + <VerticalStack + Height="Fit" Name="ItemsContainer" Margin="0" + HorizontalAlignment="Left" + VerticalAlignment="Top"/> + </Scroller> + </Border> + </Popper> +</HorizontalStack> diff --git a/Samples/DebugLogAnalyzer/ui/DbgEventTreeItems.itemp b/Samples/DebugLogAnalyzer/ui/DbgEventTreeItems.itemp index 96de2dc6..0dd44c74 100644 --- a/Samples/DebugLogAnalyzer/ui/DbgEventTreeItems.itemp +++ b/Samples/DebugLogAnalyzer/ui/DbgEventTreeItems.itemp @@ -19,7 +19,7 @@ MouseEnter="{Background=LightGrey}" MouseLeave="{Background=Transparent}"/> <Label Text="{./Caption}" Width="80" Font="mono, 8" /> - <Label Text="{Duration}" Width="40" Font="mono, 8" TextAlignment="Center" Background="DimGrey"/> + <Label Text="{DurationMS}" Width="40" Font="mono, 8" TextAlignment="Center" Background="DimGrey"/> <DbgEventWidget Event="{}" Tooltip="#Dbg.DbgEvtTooltip.crow" Width="Stretched" Height="5"/> </HorizontalStack> </Border> diff --git a/Samples/DebugLogAnalyzer/ui/DbgEventView.template b/Samples/DebugLogAnalyzer/ui/DbgEventView.template new file mode 100644 index 00000000..6679f150 --- /dev/null +++ b/Samples/DebugLogAnalyzer/ui/DbgEventView.template @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<VerticalStack Margin="${TooltipMargin}" DataSource="{./Event}"> + <Label Text="{type}" Background="{Color}" Foreground="Black" Width="200" TextAlignment="Center" Margin="6"/> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Visible="{IsWidgetEvent}" Background="DimGrey" Margin="2"> + <Label Text="Instance:" Foreground="White" Width="50%" /> + <Label Text="{InstanceIndex}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> + <Label Text="Duration(ms):" Foreground="White" Width="50%" /> + <Label Text="{DurationMS}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Right"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2"> + <Label Text="Begin(s):" Foreground="${TooltipForeground}" Width="50%"/> + <Label Text="{BeginMS}" Foreground="${TooltipForeground}" Width="Stretched" TextAlignment="Right"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2"> + <Label Text="End(s):" Foreground="${TooltipForeground}" Width="50%"/> + <Label Text="{EndMS}" Foreground="${TooltipForeground}" Width="Stretched" TextAlignment="Right"/> + </HorizontalStack> + <VerticalStack Height="Fit" Width="Stretched" IsVisible="{IsLayoutEvent}" > + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> + <Label Text="Layout:" Foreground="White" Width="50%" /> + <Label Text="{layouting}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> + <Label Text="Result:" Foreground="White" Width="50%" /> + <Label Text="{result}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> + <Label Text="Old Slot:" Foreground="White" Width="50%" /> + <Label Text="{OldSlot}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> + <Label Text="New Slot:" Foreground="White" Width="50%" /> + <Label Text="{NewSlot}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> + </HorizontalStack> + </VerticalStack> + <DbgEventWidget Height="10" Width="Stretched" Event="{}" Tooltip="#Dbg.DbgEvtTooltip.crow" /> + <GroupBox Caption="Parent Event" Height="Fit" > + <DbgEventWidget Height="10" Width="Stretched" Event="{parentEvent}" Tooltip="#Dbg.DbgEvtTooltip.crow" /> + </GroupBox> + <!--<Label Text="{}" Foreground="${TooltipForeground}"/>--> +</VerticalStack>
\ No newline at end of file diff --git a/Samples/DebugLogAnalyzer/ui/DebugLog.crow b/Samples/DebugLogAnalyzer/ui/DebugLog.crow index 26839642..2b5ab978 100644 --- a/Samples/DebugLogAnalyzer/ui/DebugLog.crow +++ b/Samples/DebugLogAnalyzer/ui/DebugLog.crow @@ -6,8 +6,8 @@ <EnumSelector RadioButtonStyle="CheckBox2" Template="#Dbg.EnumSelector.template" Caption="Discarded Events" EnumValue="{²../dbv.Filter}" BitFieldExcludeMask="255" /> <HorizontalStack> - <DbgLogViewer Visible="true" Name="dbv" Events="{Events}" Widgets="{Widgets}" MouseWheelSpeed="3" Font="mono, 8" - CurrentEvent="{²CurrentEvent}" CurrentWidget="{²CurrentWidget}" Background="Onyx"/> + <DbgLogViewer Visible="true" Name="dbv" Events="{Events}" Widgets="{Widgets}" + CurrentEvent="{²CurrentEvent}" CurrentWidget="{²CurrentWidget}" /> <ScrollBar Maximum="{../dbv.MaxScrollY}" Value="{²../dbv.ScrollY}" SmallIncrement="1" LargeIncrement="10" CursorRatio="{../dbv.ChildHeightRatio}"/> </HorizontalStack> @@ -15,10 +15,10 @@ CursorRatio="{../dbv.ChildWidthRatio}"/> <HorizontalStack Height="Fit" DataSource="{CurrentWidget}" Spacing="3"> <Label Style="smallLabValue" Text="{name}"/> - <Label Style="smallLabValue" Text="{listIndex}"/> - <Label Style="smallLabValue" Text="{treeIndex}"/> - <Label Style="smallLabValue" Text="{yIndex}"/> - <Label Style="smallLabValue" Text="{xLevel}"/> + <Label Style="smallLabValue" Text="{listIndex}" Tooltip="List index"/> + <Label Style="smallLabValue" Text="{treeIndex}" Tooltip="tree index"/> + <Label Style="smallLabValue" Text="{yIndex}" Tooltip="yIndex"/> + <Label Style="smallLabValue" Text="{xLevel}" Tooltip="xLevel"/> <Label Style="smallLabCaption" Text="Width:"/> <Label Style="smallLabValue" Text="{Width}"/> <Label Style="smallLabCaption" Text="Height:" /> @@ -31,7 +31,7 @@ <Label Style="smallLabValue" Tooltip="VisibleTicks" Text="{../../dbv.VisibleTicks}"/> </HorizontalStack> </VerticalStack> - <VerticalStack Name="AllEvents" Width="Stretched" IsVisible="false"> + <!--<VerticalStack Name="AllEvents" Width="Stretched" IsVisible="false"> <TreeView Height="Stretched" Name="dbgTV" Data="{Events}" SelectedItem="{²CurrentEvent}" Background="DarkGrey" ItemTemplate="#Dbg.DbgEventTreeItems.itemp"/> <ListBox Data="{CurWidgetEvents}" Height="100" SelectedItem="{²CurrentEvent}"> @@ -48,15 +48,14 @@ </ListBox> </VerticalStack> <VerticalStack Name="CurWidgetEvents" Width="Stretched" IsVisible="false"> - <TreeView Height="Stretched" Data="{CurWidgetEvents}" SelectedItem="{²CurrentEvent}" Background="DarkGrey" + <TreeView Height="Stretched" Data="{CurrentWidgetEvents}" Background="DarkGrey" ItemTemplate="#Dbg.DbgEventTreeItems.itemp"/> - </VerticalStack> + </VerticalStack>--> </TabView> <Splitter/> <HorizontalStack Height="30%"> - <ListBox Data="{Widgets}" Width="50%" SelectedItem="{²CurrentWidget}"> - <Template> - </Template> + <ListBox Data="{Widgets}" Width="200" SelectedItem="{²CurrentWidget}" + ItemTemplate="#Dbg.WidgetRecord.itemp"> </ListBox> <Splitter/> <VerticalStack> @@ -64,12 +63,12 @@ <Label Text="{CurrentWidget}"/> <Label Text="events"/> </HorizontalStack> - <ListBox Data="{CurWidgetEvents}" Background="Black" SelectedItem="{²CurrentEvent}"> + <ListBox Data="{CurrentWidgetEvents}" Background="Black" SelectedItem="{²CurrentEvent}"> <ItemTemplate> <ListItem Margin="0" Height="16" IsSelected="{²IsSelected}" Width="Fit" - Selected="{Background=${ControlHighlight}}" + Selected="{Background=${ControlHighlight}}" Template="Crow.ScrollingListBox.template" Unselected="{Background=Transparent}"> - <DbgEventWidget Height="10" Width="Fit" Event="{}" Tooltip="#Dbg.DbgEvtTooltip.crow" TicksPerPixel="300" VerticalAlignment="Center"/> + <DbgEventWidget Height="10" Width="Fit" Event="{}" Tooltip="#Dbg.DbgEvtTooltip.crow" TicksPerPixel="50" VerticalAlignment="Center"/> </ListItem> </ItemTemplate> <Template> @@ -80,48 +79,26 @@ ItemTemplate="#Dbg.DbgEventTreeItems.itemp"/>--> </VerticalStack> <Splitter/> - <VerticalStack Height="Stretched" Width="20%" Margin="${TooltipMargin}" DataSource="{CurrentEvent}"> - <Label Text="{type}" Background="{Color}" Foreground="Black" Width="200" TextAlignment="Center" Margin="6"/> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Visible="{IsWidgetEvent}" Background="DimGrey" Margin="2"> - <Label Text="Instance:" Foreground="White" Width="50%" /> - <Label Text="{InstanceIndex}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> - </HorizontalStack> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> - <Label Text="Duration:" Foreground="White" Width="50%" /> - <Label Text="{DurationMS}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Right"/> - </HorizontalStack> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2"> - <Label Text="Begin:" Foreground="${TooltipForeground}" Width="50%"/> - <Label Text="{BeginMS}" Foreground="${TooltipForeground}" Width="Stretched" TextAlignment="Right"/> - </HorizontalStack> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2"> - <Label Text="End:" Foreground="${TooltipForeground}" Width="50%"/> - <Label Text="{EndMS}" Foreground="${TooltipForeground}" Width="Stretched" TextAlignment="Right"/> - </HorizontalStack> - <VerticalStack Height="Fit" Width="Stretched" IsVisible="{IsLayoutEvent}" > - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> - <Label Text="Layout:" Foreground="White" Width="50%" /> - <Label Text="{layouting}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> - </HorizontalStack> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> - <Label Text="Result:" Foreground="White" Width="50%" /> - <Label Text="{result}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> - </HorizontalStack> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> - <Label Text="Old Slot:" Foreground="White" Width="50%" /> - <Label Text="{OldSlot}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> - </HorizontalStack> - <HorizontalStack Height="Fit" Width="Stretched" Spacing="2" Background="DimGrey" Margin="2"> - <Label Text="New Slot:" Foreground="White" Width="50%" /> - <Label Text="{NewSlot}" Foreground="White" Background="Onyx" Width="Stretched" TextAlignment="Center"/> - </HorizontalStack> + <DbgEventView Template="#Dbg.DbgEventView.template" Event="{../../dbv.HoverEvent}"/> + <Splitter/> + <DbgEventView Template="#Dbg.DbgEventView.template" Event="{CurrentEvent}"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Background="Onyx" Margin="1"> + <HorizontalStack Height="Fit" DataSource="{CurrentEvent}"> + <Label Foreground="Black" Text="Current Event:" Background="{Color}" Margin="2" /> + <DbgEventWidget Height="14" Width="Stretched" Event="{}" Tooltip="#Dbg.DbgEvtTooltip.crow" /> + </HorizontalStack> + <Menu Fit="true" Data="{EventCommands}"> + <ItemTemplate> + <Button Command="{}"/> + </ItemTemplate> + </Menu> + <Popper Caption="Search..."> + <VerticalStack Fit="true" Background="Onyx" Margin="10"> + <ComboBox Caption="Event Type" Data="{AllEventTypes}" SelectedItem="{²SearchEventType}"/> + <ComboBox Caption="Widget" Data="{Widgets}" SelectedItem="{²SearchWidget}"/> </VerticalStack> - <DbgEventWidget Height="10" Width="Stretched" Event="{}" Tooltip="#Dbg.DbgEvtTooltip.crow" /> - <GroupBox Caption="Parent Event" Height="Fit" > - <DbgEventWidget Height="10" Width="Stretched" Event="{parentEvent}" Tooltip="#Dbg.DbgEvtTooltip.crow" /> - </GroupBox> - <!--<Label Text="{}" Foreground="${TooltipForeground}"/>--> - </VerticalStack> + </Popper> </HorizontalStack> </VerticalStack> </Window>
\ No newline at end of file diff --git a/Samples/DebugLogAnalyzer/ui/WidgetRecord.itemp b/Samples/DebugLogAnalyzer/ui/WidgetRecord.itemp new file mode 100644 index 00000000..2b1297d3 --- /dev/null +++ b/Samples/DebugLogAnalyzer/ui/WidgetRecord.itemp @@ -0,0 +1,11 @@ +<ListItem Height="Fit" Margin="1" Focusable="true" HorizontalAlignment="Left" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack> + <Label Text="{name}" Width="Stretched"/> + <Label Style="labWidgetRecordList" Text="{listIndex}" Tooltip="List index"/> + <Label Style="labWidgetRecordList" Text="{treeIndex}" Tooltip="tree index"/> + <Label Style="labWidgetRecordList" Text="{yIndex}" Tooltip="yIndex"/> + <Label Style="labWidgetRecordList" Text="{xLevel}" Tooltip="xLevel"/> + </HorizontalStack> +</ListItem>
\ No newline at end of file diff --git a/Samples/DebugLogAnalyzer/ui/dbg.style b/Samples/DebugLogAnalyzer/ui/dbg.style index 77772f10..90ec61da 100644 --- a/Samples/DebugLogAnalyzer/ui/dbg.style +++ b/Samples/DebugLogAnalyzer/ui/dbg.style @@ -12,4 +12,25 @@ smallLabCaption { smallLabValue { Font="mono, 10"; Foreground="White"; +} +DbgLogViewer { + MouseWheelSpeed="3"; + Font="mono, 8"; + Background="Onyx"; +} +DbgEventView { + Height="Fit"; + Width="150"; +} +ComboBox { + Template="#Dbg.ComboBox.template"; + Background="Jet"; +} +labWidgetRecordList { + Font="mono, 11"; + Background="Grey"; + Foreground="Jet"; + Margin="0"; + Width="24"; + TextAlignment="Right"; }
\ No newline at end of file diff --git a/Samples/DebugLogAnalyzer/ui/dockWindows/winLogGraph.crow b/Samples/DebugLogAnalyzer/ui/dockWindows/winLogGraph.crow new file mode 100644 index 00000000..7e6a11b8 --- /dev/null +++ b/Samples/DebugLogAnalyzer/ui/dockWindows/winLogGraph.crow @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<DockWindow Caption="Debug Log" Background="0.05,0.05,0.1,0.9" Width="80%" Height="80%"> + <VerticalStack Name="LogGraph" Background="DarkGrey"> + <EnumSelector RadioButtonStyle="CheckBox2" Template="#Dbg.EnumSelector.template" + Caption="Discarded Events" EnumValue="{²../dbv.Filter}" BitFieldExcludeMask="255" /> + <HorizontalStack> + <DbgLogViewer Visible="true" Name="dbv" Events="{Events}" Widgets="{Widgets}" + CurrentEvent="{²CurrentEvent}" CurrentWidget="{²CurrentWidget}" /> + <ScrollBar Maximum="{../dbv.MaxScrollY}" Value="{²../dbv.ScrollY}" SmallIncrement="1" LargeIncrement="10" + CursorRatio="{../dbv.ChildHeightRatio}"/> + </HorizontalStack> + <ScrollBar Style="HScrollBar" Maximum="{../dbv.MaxScrollX}" Value="{²../dbv.ScrollX}" SmallIncrement="1" LargeIncrement="10" + CursorRatio="{../dbv.ChildWidthRatio}"/> + </VerticalStack> +</Window>
\ No newline at end of file diff --git a/Samples/DebugLogAnalyzer/ui/main.crow b/Samples/DebugLogAnalyzer/ui/main.crow index 913220db..22d0920d 100644 --- a/Samples/DebugLogAnalyzer/ui/main.crow +++ b/Samples/DebugLogAnalyzer/ui/main.crow @@ -1,8 +1,8 @@ <?xml version="1.0"?> <VerticalStack Background="DarkGrey"> <HorizontalStack > - <TabView Width="25%" > - <VerticalStack Name="Explorer" Background="Onyx"> + <HorizontalStack Width="25%" > + <VerticalStack Width="50%" Name="Explorer" Background="Onyx"> <HorizontalStack Height="Fit" Margin="2" > <Image Margin="2" Width="16" Height="16" Path="#Crow.Icons.level-up.svg" MouseClick="goUpDirClick" Background="Jet" MouseEnter="{Background=Grey}" MouseLeave="{Background=Jet}" /> @@ -60,7 +60,8 @@ </Template> </DirectoryView> </VerticalStack> - <VerticalStack Name="DebugLogger" Margin="5" IsVisible="false" Background="Onyx"> + <Splitter/> + <VerticalStack Name="DebugLogger" Margin="5" IsVisible="true" Background="Onyx"> <HorizontalStack Height="Fit"> <Image Width="30" Height="20" Path="#Crow.Icons.IconAlerte.svg" Visible="{../../../../dbgIfaceWidget.CrowDebuggerNOK}"/> <Label Fit="true" Text="Crow debug assembly path:"/> @@ -80,7 +81,8 @@ Caption="Recorded Events" EnumValue="{²RecordedEvents}" BitFieldExcludeMask="255" /> <EnumSelector RadioButtonStyle="CheckBox2" Template="#Dbg.EnumSelector.template" Background="Onyx" - Caption="Discarded Events" EnumValue="{²DiscardedEvents}" BitFieldExcludeMask="255" /> + Caption="Discarded Events" EnumValue="{²DiscardedEvents}" BitFieldExcludeMask="255" /> + <CheckBox Caption="Begin recording on startup" IsChecked="{²DebugLogOnStartup}" Background="Onyx"/> <HorizontalStack Height="Fit"> <CheckBox Caption="Recording" IsChecked="{²DebugLogRecording}" Height="40" Width="60" Checked="{sh.Path='A 8,8,7.5,0,6.3 O 0.8,0,0,1 f O 0,0,0,0.5 G'}" @@ -98,7 +100,7 @@ </Menu> </HorizontalStack> </VerticalStack> - </TabView> + </HorizontalStack> <Splitter Width="6" /> <VerticalStack> <DebugInterfaceWidget Name="dbgIfaceWidget" Height="60%" Background="Black" Focusable="true" |