Browse Source

Magnifier image in debugger tooltips.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4831 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Martin Koníček 17 years ago
parent
commit
698ada6a5a
  1. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ObjectValue.cs
  2. 5
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  3. 32
      src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerPopup.cs
  4. 8
      src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml
  5. 5
      src/Main/Base/Project/Src/Services/Debugger/Tooltips/Images.xaml
  6. 17
      src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.xaml

4
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Visualizers/GridVisualizer/ObjectValue.cs

@ -24,8 +24,8 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer
get { return index; } get { return index; }
} }
// Used to be able to expand items of IEnumerable // PermanentReference to one row. Even if we used expressions, they are cached using PermanentReferences, so
// Now we rely on PermanentReference to be able to get member values on demand. With IList, PermanentReference could be replaced by Expression // one PermanentReference for a row would be created anyway
public Value PermanentReference { get; private set; } public Value PermanentReference { get; private set; }
private Dictionary<string, ObjectProperty> properties = new Dictionary<string, ObjectProperty>(); private Dictionary<string, ObjectProperty> properties = new Dictionary<string, ObjectProperty>();

5
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -268,7 +268,9 @@
<Compile Include="Src\Services\ProjectBinding\IProjectBinding.cs" /> <Compile Include="Src\Services\ProjectBinding\IProjectBinding.cs" />
<Compile Include="Src\Internal\Templates\Project\ProjectCreateInformation.cs" /> <Compile Include="Src\Internal\Templates\Project\ProjectCreateInformation.cs" />
<Compile Include="Src\Services\ProjectBinding\ProjectBindingService.cs" /> <Compile Include="Src\Services\ProjectBinding\ProjectBindingService.cs" />
<None Include="Src\Services\Debugger\Tooltips\magnifier.png" /> <Resource Include="Src\Services\Debugger\Tooltips\magnifier.png">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Resource>
<None Include="Src\Services\ParserService\OldParserService.cs" /> <None Include="Src\Services\ParserService\OldParserService.cs" />
<Compile Include="Src\Services\DisplayBinding\DisplayBindingDoozer.cs" /> <Compile Include="Src\Services\DisplayBinding\DisplayBindingDoozer.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\CombineOpenEvaluator.cs" /> <Compile Include="Src\Internal\ConditionEvaluators\CombineOpenEvaluator.cs" />
@ -886,7 +888,6 @@
<Page Include="Src\Gui\Dialogs\TreeViewOptionsDialog.xaml" /> <Page Include="Src\Gui\Dialogs\TreeViewOptionsDialog.xaml" />
<Page Include="Src\Gui\Workbench\WpfWorkbench.xaml" /> <Page Include="Src\Gui\Workbench\WpfWorkbench.xaml" />
<Page Include="Src\Services\Debugger\Tooltips\DebuggerTooltipControl.xaml" /> <Page Include="Src\Services\Debugger\Tooltips\DebuggerTooltipControl.xaml" />
<Page Include="Src\Services\Debugger\Tooltips\Images.xaml" />
<Page Include="Src\Services\Debugger\Tooltips\VisualizerPicker.xaml" /> <Page Include="Src\Services\Debugger\Tooltips\VisualizerPicker.xaml" />
<Page Include="Src\TextEditor\Gui\Dialogs\GotoDialog.xaml" /> <Page Include="Src\TextEditor\Gui\Dialogs\GotoDialog.xaml" />
</ItemGroup> </ItemGroup>

32
src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerPopup.cs

@ -6,10 +6,12 @@
// </file> // </file>
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows.Input;
using ICSharpCode.Core; using ICSharpCode.Core;
using System.Windows.Input; using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.SharpDevelop.Debugging namespace ICSharpCode.SharpDevelop.Debugging
{ {
@ -26,6 +28,8 @@ namespace ICSharpCode.SharpDevelop.Debugging
this.contentControl.containingPopup = this; this.contentControl.containingPopup = this;
this.Child = this.contentControl; this.Child = this.contentControl;
this.IsLeaf = false; this.IsLeaf = false;
//this.KeyDown += new KeyEventHandler(DebuggerPopup_KeyDown);
//this.contentControl.Focusable = true; //this.contentControl.Focusable = true;
//Keyboard.Focus(this.contentControl); //Keyboard.Focus(this.contentControl);
@ -33,6 +37,32 @@ namespace ICSharpCode.SharpDevelop.Debugging
//this.PopupAnimation = PopupAnimation.Slide; //this.PopupAnimation = PopupAnimation.Slide;
} }
// attempt to propagate shortcuts to main windows when Popup is focusable (needed for keyboard scrolling + editing)
/*void DebuggerPopup_KeyDown(object sender, KeyEventArgs e)
{
LoggingService.Debug("Unhandled popup key down: " + e.Key);
RaiseEventPair(WorkbenchSingleton.MainWindow, PreviewKeyDownEvent, KeyDownEvent,
new KeyEventArgs(e.KeyboardDevice, e.InputSource, e.Timestamp, e.Key));
}
// copied from CompletionWindowBase
static bool RaiseEventPair(UIElement target, RoutedEvent previewEvent, RoutedEvent @event, RoutedEventArgs args)
{
if (target == null)
throw new ArgumentNullException("target");
if (previewEvent == null)
throw new ArgumentNullException("previewEvent");
if (@event == null)
throw new ArgumentNullException("event");
if (args == null)
throw new ArgumentNullException("args");
args.RoutedEvent = previewEvent;
target.RaiseEvent(args);
args.RoutedEvent = @event;
target.RaiseEvent(args);
return args.Handled;
}*/
public IEnumerable<ITreeNode> ItemsSource public IEnumerable<ITreeNode> ItemsSource
{ {
get { return this.contentControl.ItemsSource; } get { return this.contentControl.ItemsSource; }

8
src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml

@ -1,7 +1,9 @@
<UserControl x:Class="ICSharpCode.SharpDevelop.Debugging.DebuggerTooltipControl" <UserControl x:Class="ICSharpCode.SharpDevelop.Debugging.DebuggerTooltipControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:debugging="clr-namespace:ICSharpCode.SharpDevelop.Debugging"> xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:debugging="clr-namespace:ICSharpCode.SharpDevelop.Debugging"
>
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary Source="VisualizerPicker.xaml" /> <ResourceDictionary Source="VisualizerPicker.xaml" />
@ -94,7 +96,7 @@
</UserControl.Resources> </UserControl.Resources>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<RepeatButton Name="btnUp" Style="{StaticResource upButtonStyle}" Content="^" Click="BtnUp_Click"></RepeatButton> <RepeatButton Name="btnUp" Focusable="False" Style="{StaticResource upButtonStyle}" Content="^" Click="BtnUp_Click"></RepeatButton>
<DataGrid VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" <DataGrid VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled"
GridLinesVisibility="None" GridLinesVisibility="None"
RowHeight="18" MaxHeight="202" RowHeight="18" MaxHeight="202"
@ -196,6 +198,6 @@
</DataGridTemplateColumn> </DataGridTemplateColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<RepeatButton Name="btnDown" Style="{StaticResource downButtonStyle}" Content="v" Click="BtnDown_Click"></RepeatButton> <RepeatButton Name="btnDown" Focusable="False" Style="{StaticResource downButtonStyle}" Content="v" Click="BtnDown_Click"></RepeatButton>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

5
src/Main/Base/Project/Src/Services/Debugger/Tooltips/Images.xaml

@ -1,5 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<BitmapImage x:Key="MagnifierImage" UriSource="magnifier.png" />
</ResourceDictionary>

17
src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.xaml

@ -3,8 +3,7 @@
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:debugging="clr-namespace:ICSharpCode.SharpDevelop.Debugging"> xmlns:debugging="clr-namespace:ICSharpCode.SharpDevelop.Debugging">
<!-- <BitmapImage x:Key="MagnifierImage" UriSource="magnifier.png" />
<BitmapImage x:Key="MagnifierImage" UriSource="magnifier.png" /> -->
<Style x:Key="ComboBoxFocusVisual"> <Style x:Key="ComboBoxFocusVisual">
<Setter Property="Control.Template"> <Setter Property="Control.Template">
@ -33,20 +32,28 @@
<ControlTemplate TargetType="{x:Type ToggleButton}"> <ControlTemplate TargetType="{x:Type ToggleButton}">
<!-- Button face - changed from original ButtonChrome to Border --> <!-- Button face - changed from original ButtonChrome to Border -->
<Border Name="FaceBorder" Background="White" CornerRadius="2" BorderBrush="#FFD9D9E9" BorderThickness="1" Padding="1" > <Border Name="FaceBorder" Background="Transparent" CornerRadius="2" BorderBrush="Transparent" BorderThickness="1" Padding="1" >
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/> <ColumnDefinition Width="5"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- <!--
<Image Grid.Column="0" Width="10" Height="10" Stretch="Fill" Source="{StaticResource MagnifierImage}" /> --> <Rectangle Width="10" Height="10" Grid.Column="0" Fill="Black"></Rectangle> -->
<Image Grid.Column="0" Width="10" Height="10" Stretch="Fill" Source="{StaticResource MagnifierImage}" />
<Path Grid.Column="1" x:Name="Arrow" Fill="Black" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}"/> <Path Grid.Column="1" x:Name="Arrow" Fill="Black" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}"/>
</Grid> </Grid>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true"> <Trigger Property="IsChecked" Value="true">
<Setter TargetName="FaceBorder" Property="Background" Value="#FFE0EDFF"/> <Setter TargetName="FaceBorder" Property="Background" Value="White"/>
<Setter TargetName="FaceBorder" Property="BorderBrush" Value="#FFE0EDFF"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="FaceBorder" Property="Background" Value="White"/>
<Setter TargetName="FaceBorder" Property="BorderBrush" Value="#FFE0EDFF"/>
<!-- #FFE0EDFF border -->
<!-- #FFD9D9E9 fill -->
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>

Loading…
Cancel
Save