2019-05-23 20:38:41 +00:00
|
|
|
<!--
|
|
|
|
Copyright 2019 faddenSoft
|
2019-06-16 23:34:47 +00:00
|
|
|
|
2019-05-23 20:38:41 +00:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
2019-10-13 00:23:32 +00:00
|
|
|
ListView/ListViewItem control template and style. This is used for the main code ListView.
|
|
|
|
The most significant consideration is getting long comments and notes into the 5th column and
|
2019-10-09 18:06:45 +00:00
|
|
|
having them span multiple columns. Most of this came from the default style (WPF 4.5 on
|
|
|
|
Win10, default theme).
|
2019-05-23 20:38:41 +00:00
|
|
|
|
|
|
|
This interacts with DisplayList.FormattedParts.
|
|
|
|
|
|
|
|
See also https://github.com/fadden/DisasmUiTest
|
|
|
|
-->
|
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
|
|
|
|
<!-- some brushes, extracted from the default style -->
|
|
|
|
<LinearGradientBrush x:Key="ListItemHoverFill" EndPoint="0,1" StartPoint="0,0">
|
2019-10-13 00:23:32 +00:00
|
|
|
<GradientStop Color="{DynamicResource Color_HoverFill0}" Offset="0"/>
|
|
|
|
<GradientStop Color="{DynamicResource Color_HoverFill1}" Offset="1"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
|
|
<LinearGradientBrush x:Key="ListItemSelectedFill" EndPoint="0,1" StartPoint="0,0">
|
2019-10-13 00:23:32 +00:00
|
|
|
<GradientStop Color="{DynamicResource Color_SelectedFill0}" Offset="0"/>
|
|
|
|
<GradientStop Color="{DynamicResource Color_SelectedFill1}" Offset="1"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
|
|
<LinearGradientBrush x:Key="ListItemSelectedInactiveFill" EndPoint="0,1" StartPoint="0,0">
|
2019-10-13 00:23:32 +00:00
|
|
|
<GradientStop Color="{DynamicResource Color_SelectedInactiveFill0}" Offset="0"/>
|
|
|
|
<GradientStop Color="{DynamicResource Color_SelectedInactiveFill1}" Offset="1"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
|
|
<LinearGradientBrush x:Key="ListItemSelectedHoverFill" EndPoint="0,1" StartPoint="0,0">
|
2019-10-13 00:23:32 +00:00
|
|
|
<GradientStop Color="{DynamicResource Color_SelectedHoverFill0}" Offset="0"/>
|
|
|
|
<GradientStop Color="{DynamicResource Color_SelectedHoverFill1}" Offset="1"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
|
|
<!-- Column set for the long-comment lines. The first five columns will be empty, but
|
|
|
|
have their widths set to match those in the containing ListView.
|
|
|
|
If you don't set DisplayMemberBinding, it will try to ToString() the entire object.
|
|
|
|
-->
|
|
|
|
<GridViewColumnCollection x:Key="gvcc">
|
2019-07-07 00:24:42 +00:00
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Offset}" Width="{Binding
|
2019-05-23 20:38:41 +00:00
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
2019-07-07 00:24:42 +00:00
|
|
|
}, Path=View.Columns[0].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Addr}" Width="{Binding
|
2019-05-23 20:38:41 +00:00
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
2019-07-07 00:24:42 +00:00
|
|
|
}, Path=View.Columns[1].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Bytes}" Width="{Binding
|
2019-05-23 20:38:41 +00:00
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
2019-07-07 00:24:42 +00:00
|
|
|
}, Path=View.Columns[2].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Flags}" Width="{Binding
|
2019-05-23 20:38:41 +00:00
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
2019-07-07 00:24:42 +00:00
|
|
|
}, Path=View.Columns[3].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Attr}" Width="{Binding
|
2019-05-23 20:38:41 +00:00
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
2019-07-07 00:24:42 +00:00
|
|
|
}, Path=View.Columns[4].ActualWidth}"/>
|
|
|
|
<!-- This column holds the long comment. There's no easy way to set its width, so we
|
|
|
|
have to let the main window take care of that. (It's tempting to just make its width
|
|
|
|
very large, but that causes the GridView contents to horizontally scroll independently
|
|
|
|
of the GridView header when you reach the edge of the "normal" column set.) -->
|
|
|
|
<GridViewColumn Header="(long comment)" DisplayMemberBinding="{Binding Path=Comment}"
|
|
|
|
Width="{Binding LongCommentWidth}"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</GridViewColumnCollection>
|
|
|
|
|
2019-12-01 01:52:33 +00:00
|
|
|
<GridViewColumnCollection x:Key="gvcc_vs">
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Offset}" Width="{Binding
|
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
|
|
|
}, Path=View.Columns[0].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Addr}" Width="{Binding
|
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
|
|
|
}, Path=View.Columns[1].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Bytes}" Width="{Binding
|
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
|
|
|
}, Path=View.Columns[2].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Flags}" Width="{Binding
|
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
|
|
|
}, Path=View.Columns[3].ActualWidth}"/>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding Attr}" Width="{Binding
|
|
|
|
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}
|
|
|
|
}, Path=View.Columns[4].ActualWidth}"/>
|
2019-12-03 22:34:45 +00:00
|
|
|
<!-- This column holds the visualization set. -->
|
2019-12-01 01:52:33 +00:00
|
|
|
<GridViewColumn Header="(visualization set)" Width="{Binding LongCommentWidth}">
|
|
|
|
<GridViewColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2019-12-07 17:11:25 +00:00
|
|
|
<TextBlock Text="{Binding Path=Comment}" VerticalAlignment="Center" Margin="0,0,8,0"
|
|
|
|
Visibility="Collapsed"/>
|
2019-12-03 22:34:45 +00:00
|
|
|
<ItemsControl ItemsSource="{Binding VisualizationSet}">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Horizontal"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
2019-12-07 17:11:25 +00:00
|
|
|
<Border BorderThickness="1" Padding="1"
|
2019-12-03 22:34:45 +00:00
|
|
|
Background="{StaticResource BitmapBackground}">
|
2019-12-25 18:07:42 +00:00
|
|
|
<Grid>
|
|
|
|
<Image Width="64" Height="64" Source="{Binding CachedImage}"
|
|
|
|
RenderOptions.BitmapScalingMode="NearestNeighbor"/>
|
|
|
|
<Image Width="64" Height="64" Source="{Binding OverlayImage}"/>
|
|
|
|
</Grid>
|
2019-12-03 22:34:45 +00:00
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
2019-12-01 01:52:33 +00:00
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</GridViewColumn.CellTemplate>
|
|
|
|
</GridViewColumn>
|
|
|
|
</GridViewColumnCollection>
|
|
|
|
|
2019-10-09 18:06:45 +00:00
|
|
|
<!-- Base template for ListView items, derived from the system default. We have to define
|
|
|
|
this fully so things don't turn into a big mess on long-comment lines. -->
|
|
|
|
<ControlTemplate x:Key="baseListItemTemplate" TargetType="{x:Type ListViewItem}">
|
|
|
|
<StackPanel>
|
|
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
CornerRadius="2"
|
|
|
|
SnapsToDevicePixels="true">
|
|
|
|
<Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="1">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition MaxHeight="11"/>
|
|
|
|
<RowDefinition/>
|
|
|
|
</Grid.RowDefinitions>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Rectangle x:Name="UpperHighlight" Fill="{DynamicResource Brush_SelectedUpperHighlight}" Visibility="Collapsed"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
<GridViewRowPresenter Grid.RowSpan="2"
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- triggers for hover, selection, and activation effects -->
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemHoverFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_MouseOverBorder}"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
<Setter Property="Visibility" TargetName="UpperHighlight" Value="Visible"/>
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsSelected" Value="true">
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedBorder}"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
|
|
|
|
<Setter Property="Visibility" TargetName="UpperHighlight" Value="Visible"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="Fill" TargetName="UpperHighlight" Value="{DynamicResource Brush_SelectedUpperHighlight}"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
</Trigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedInactiveFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedActiveBorder}"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
</MultiTrigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
<Condition Property="IsMouseOver" Value="true"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedHoverFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedMouseOverBorder}"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
</MultiTrigger>
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
|
2019-05-23 20:38:41 +00:00
|
|
|
<!-- Template for long lines. This is a modification of the default style, with
|
|
|
|
Content and Columns attributes defined in the GridViewRowPresenter. It appears we
|
|
|
|
inherit the FocusVisualStyle from the default. -->
|
2019-06-04 20:06:24 +00:00
|
|
|
<ControlTemplate x:Key="longCommentTemplate" TargetType="{x:Type ListViewItem}">
|
2019-05-23 20:38:41 +00:00
|
|
|
<StackPanel>
|
|
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
CornerRadius="2"
|
|
|
|
SnapsToDevicePixels="true">
|
|
|
|
<Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="1">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition MaxHeight="11"/>
|
|
|
|
<RowDefinition/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Rectangle x:Name="UpperHighlight" Fill="#75FFFFFF" Visibility="Collapsed"/>
|
|
|
|
<GridViewRowPresenter Content="{TemplateBinding Content}"
|
|
|
|
Columns="{StaticResource gvcc}"
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- triggers for hover, selection, and activation effects -->
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemHoverFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_MouseOverBorder}"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
<Setter Property="Visibility" TargetName="UpperHighlight" Value="Visible"/>
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsSelected" Value="true">
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedBorder}"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
|
|
|
|
<Setter Property="Visibility" TargetName="UpperHighlight" Value="Visible"/>
|
|
|
|
<Setter Property="Fill" TargetName="UpperHighlight" Value="#40FFFFFF"/>
|
|
|
|
</Trigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedInactiveFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedActiveBorder}"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</MultiTrigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
<Condition Property="IsMouseOver" Value="true"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedHoverFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedMouseOverBorder}"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</MultiTrigger>
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
|
2019-12-01 01:52:33 +00:00
|
|
|
<!-- yet another copy of the template, this one for VisualizationSet lines -->
|
|
|
|
<ControlTemplate x:Key="visualizationSetTemplate" TargetType="{x:Type ListViewItem}">
|
|
|
|
<StackPanel>
|
|
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
CornerRadius="2"
|
|
|
|
SnapsToDevicePixels="true">
|
|
|
|
<Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="1">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition MaxHeight="11"/>
|
|
|
|
<RowDefinition/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Rectangle x:Name="UpperHighlight" Fill="#75ffffff" Visibility="Collapsed"/>
|
|
|
|
<GridViewRowPresenter Content="{TemplateBinding Content}"
|
|
|
|
Columns="{StaticResource gvcc_vs}"
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- triggers for hover, selection, and activation effects -->
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemHoverFill}"/>
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_MouseOverBorder}"/>
|
|
|
|
<Setter Property="Visibility" TargetName="UpperHighlight" Value="Visible"/>
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsSelected" Value="true">
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedFill}"/>
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedBorder}"/>
|
|
|
|
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
|
|
|
|
<Setter Property="Visibility" TargetName="UpperHighlight" Value="Visible"/>
|
|
|
|
<Setter Property="Fill" TargetName="UpperHighlight" Value="#40FFFFFF"/>
|
|
|
|
</Trigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedInactiveFill}"/>
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedActiveBorder}"/>
|
|
|
|
</MultiTrigger>
|
|
|
|
<MultiTrigger>
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
<Condition Property="IsMouseOver" Value="true"/>
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Background" Value="{StaticResource ListItemSelectedHoverFill}"/>
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush_SelectedMouseOverBorder}"/>
|
|
|
|
</MultiTrigger>
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
|
|
|
2019-10-09 18:06:45 +00:00
|
|
|
<!-- ListView style. We have to override the general foreground/background colors to
|
|
|
|
avoid making the whole thing look freakish. -->
|
|
|
|
<Style x:Key="codeListStyle" TargetType="{x:Type ListView}">
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource Brush_ListViewForeground}"/>
|
|
|
|
<Setter Property="Background" Value="{DynamicResource Brush_ListViewBackground}"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
</Style>
|
|
|
|
|
2019-05-23 20:38:41 +00:00
|
|
|
<Style x:Key="codeListItemStyle" TargetType="{x:Type ListViewItem}">
|
2019-10-09 18:06:45 +00:00
|
|
|
<!-- Base template. -->
|
|
|
|
<Setter Property="Template" Value="{StaticResource baseListItemTemplate}"/>
|
|
|
|
|
2019-06-08 00:25:04 +00:00
|
|
|
<!-- There's a one-pixel gap between items, possibly space for grid lines, that
|
|
|
|
can't seem to be eliminated. Declaring a negative margin removes it. This is
|
|
|
|
necessary because the gap isn't a mouse target, so if your mouse is in just the
|
|
|
|
wrong place you'll feel like you clicked and nothing happened. -->
|
|
|
|
<Setter Property="Margin" Value="0,-1,0,0"/>
|
|
|
|
|
2019-06-16 16:29:54 +00:00
|
|
|
<!-- This causes individual TextBoxes to stretch to fill the column. This is nice
|
|
|
|
because the cell-highlight stuff will set the background on the full cell rather than
|
|
|
|
just the bit with the text. -->
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
|
|
|
2019-05-23 20:38:41 +00:00
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Path=IsLongComment}" Value="True">
|
2019-06-04 20:06:24 +00:00
|
|
|
<Setter Property="Template" Value="{StaticResource longCommentTemplate}"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</DataTrigger>
|
2019-12-01 01:52:33 +00:00
|
|
|
<DataTrigger Binding="{Binding Path=IsVisualizationSet}" Value="True">
|
|
|
|
<Setter Property="Template" Value="{StaticResource visualizationSetTemplate}"/>
|
|
|
|
</DataTrigger>
|
2019-07-14 22:39:27 +00:00
|
|
|
<DataTrigger Binding="{Binding Path=HasBackgroundColor}" Value="True">
|
|
|
|
<Setter Property="Background" Value="{Binding Path=BackgroundBrush}"/>
|
|
|
|
</DataTrigger>
|
2019-05-23 20:38:41 +00:00
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
2019-06-16 16:29:54 +00:00
|
|
|
|
|
|
|
<!-- Highlighting for individual cells. -->
|
2019-06-16 23:34:47 +00:00
|
|
|
<LinearGradientBrush x:Key="HighlightedCellFill" EndPoint="0,1" StartPoint="0,0">
|
2019-10-13 00:23:32 +00:00
|
|
|
<GradientStop Color="{DynamicResource Color_HighlightedCellFill0}" Offset="0"/>
|
|
|
|
<GradientStop Color="{DynamicResource Color_HighlightedCellFill1}" Offset="1"/>
|
2019-06-16 23:34:47 +00:00
|
|
|
</LinearGradientBrush>
|
|
|
|
|
2019-06-16 16:29:54 +00:00
|
|
|
<DataTemplate x:Key="addrHighlightTemplate">
|
|
|
|
<TextBlock>
|
|
|
|
<TextBlock.Style>
|
2019-06-27 00:11:58 +00:00
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
2019-06-16 16:29:54 +00:00
|
|
|
<Style.Triggers>
|
ORG rework, part 6
Added support for non-addressable regions, which are useful for things
like file headers stripped out by the system loader, or chunks that
get loaded into non-addressable graphics RAM. Regions are specified
with the "NA" address value. The code list displays the address field
greyed out, starting from zero (which is kind of handy if you want to
know the relative offset within the region).
Putting labels in non-addressable regions doesn't make sense, but
symbol resolution is complicated enough that we really only have two
options: ignore the labels entirely, or allow them but warn of their
presence. The problem isn't so much the label, which you could
legitimately want to access from an extension script, but rather the
references to them from code or data. So we keep the label and add a
warning to the Messages list when we see a reference.
Moved NON_ADDR constants to Address class. AddressMap now has a copy.
This is awkward because Asm65 and CommonUtil don't share.
Updated the asm code generators to understand NON_ADDR, and reworked
the API so that Merlin and cc65 output is correct for nested regions.
Address region changes are now noted in the anattribs array, which
makes certain operations faster than checking the address map. It
also fixes a failure to recognize mid-instruction region changes in
the code analyzer.
Tweaked handling of synthetic regions, which are non-addressable areas
generated by the linear address map traversal to fill in any "holes".
The address region editor now treats attempts to edit them as
creation of a new region.
2021-10-01 01:07:21 +00:00
|
|
|
<DataTrigger Binding="{Binding Path=IsNonAddressable}" Value="True">
|
|
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource Brush_ListViewGreyText}"/>
|
|
|
|
</DataTrigger>
|
2019-06-16 16:29:54 +00:00
|
|
|
<DataTrigger Binding="{Binding Path=HasAddrLabelHighlight}" Value="True">
|
2019-06-16 23:34:47 +00:00
|
|
|
<Setter Property="TextBlock.Background" Value="{StaticResource HighlightedCellFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource Brush_ListViewForeground}"/>
|
2019-06-16 16:29:54 +00:00
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</TextBlock.Style>
|
|
|
|
<TextBlock.Text>
|
|
|
|
<Binding Path="Addr"/>
|
|
|
|
</TextBlock.Text>
|
|
|
|
</TextBlock>
|
|
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="labelHighlightTemplate">
|
|
|
|
<TextBlock>
|
|
|
|
<TextBlock.Style>
|
2019-06-27 00:11:58 +00:00
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
2019-06-16 16:29:54 +00:00
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Path=HasAddrLabelHighlight}" Value="True">
|
2019-06-16 23:34:47 +00:00
|
|
|
<Setter Property="TextBlock.Background" Value="{StaticResource HighlightedCellFill}"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource Brush_ListViewForeground}"/>
|
2019-06-16 16:29:54 +00:00
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</TextBlock.Style>
|
|
|
|
<TextBlock.Text>
|
|
|
|
<Binding Path="Label"/>
|
|
|
|
</TextBlock.Text>
|
|
|
|
</TextBlock>
|
|
|
|
</DataTemplate>
|
2019-09-02 22:18:55 +00:00
|
|
|
<DataTemplate x:Key="flagsHighlightTemplate">
|
|
|
|
<TextBlock>
|
|
|
|
<TextBlock.Style>
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Path=HasModifiedFlags}" Value="True">
|
|
|
|
<Setter Property="TextBlock.Foreground" Value="DeepSkyBlue"/>
|
|
|
|
<Setter Property="TextBlock.FontWeight" Value="Bold"/>
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
</TextBlock.Style>
|
|
|
|
<TextBlock.Text>
|
|
|
|
<Binding Path="Flags"/>
|
|
|
|
</TextBlock.Text>
|
|
|
|
</TextBlock>
|
|
|
|
</DataTemplate>
|
2019-05-23 20:38:41 +00:00
|
|
|
</ResourceDictionary>
|