Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename HotCommands and DocComment #5524

Merged
merged 2 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ internal static partial class UiaCore
public interface IRawElementProviderFragment : IRawElementProviderSimple
{
/// <summary>
/// Request to return the element in the specified direction
/// Returns the element in the specified <paramref name="direction"/>.
/// </summary>
/// <param name="direction">Indicates the direction in which to navigate</param>
/// <returns>Returns the element in the specified direction</returns>
/// <param name="direction">Indicates the direction in which to navigate.</param>
/// <returns>Returns the element in the specified direction if it exists.</returns>
JeremyKuhne marked this conversation as resolved.
Show resolved Hide resolved
[return: MarshalAs(UnmanagedType.IUnknown)]
object? /*IRawElementProviderFragment*/ Navigate(NavigateDirection direction);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public interface IRawElementProviderSimple
object? GetPatternProvider(UIA patternId);

/// <summary>
/// Request value of specified property from an element.
/// Returns the value of the specified <paramref name="propertyId"/> from the element.
/// </summary>
/// <param name="propertyId">Identifier indicating the property to return</param>
/// <returns>Returns a ValInfo indicating whether the element supports this property, or has no value for it.</returns>
/// <returns>Returns the requested value if supported or null if it is not.</returns>
object? GetPropertyValue(UIA propertyId);

// Only native impl roots need to return something for this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ internal virtual int ProviderOptions

internal virtual UiaCore.IRawElementProviderSimple? HostRawElementProvider => null;

/// <summary>
/// Returns the value of the specified <paramref name="propertyID"/> from the element.
/// </summary>
/// <param name="propertyID">Identifier indicating the property to return</param>
/// <returns>Returns the requested value if supported or null if it is not.</returns>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we omit 'Returns'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, missed a few.

internal virtual object? GetPropertyValue(UiaCore.UIA propertyID) =>
propertyID switch
{
Expand Down Expand Up @@ -419,6 +424,11 @@ private bool IsInvokePatternAvailable

internal virtual int GetChildId() => NativeMethods.CHILDID_SELF;

/// <summary>
/// Returns the element in the specified <paramref name="direction"/>.
/// </summary>
/// <param name="direction">Indicates the direction in which to navigate.</param>
/// <returns>Returns the element in the specified direction if it exists.</returns>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we omit 'Returns'?

internal virtual UiaCore.IRawElementProviderFragment? FragmentNavigate(UiaCore.NavigateDirection direction) => null;

internal virtual UiaCore.IRawElementProviderSimple[]? GetEmbeddedFragmentRoots() => null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,48 @@

namespace System.Windows.Forms.ComponentModel.Com2Interop
{
/// <summary>
/// Allows Visual Studio to communicate internally with the PropertyGrid control.
/// </summary>
public interface IComPropertyBrowser
{
/// <summary>
/// Closes andy open drop-down controls on the <see cref="PropertyGrid"/> control.
/// </summary>
void DropDownDone();

/// <summary>
/// Gets a value indicating whether the <see cref="PropertyGrid"/> control is currently setting one of the
/// properties of its selected object.
/// </summary>
bool InPropertySet { get; }

/// <summary>
/// Occurs when the <see cref="PropertyGrid"/> control is browsing a COM object and the user renames the object.
/// </summary>
event ComponentRenameEventHandler ComComponentNameChanged;

/// <summary>
/// Commits all pending changes to the <see cref="PropertyGrid"/> control.
/// </summary>
/// <returns>true if the <see cref="PropertyGrid"/> successfully commits changes; otherwise, false.</returns>
JeremyKuhne marked this conversation as resolved.
Show resolved Hide resolved
bool EnsurePendingChangesCommitted();

/// <summary>
/// Activates the <see cref="PropertyGrid"/> control when the user chooses Properties for a control in Design view.
/// </summary>
void HandleF4();

/// <summary>
/// Loads user states from the registry into the <see cref="PropertyGrid"/> control.
/// </summary>
/// <param name="key">The registry key that contains the user states.</param>
void LoadState(RegistryKey key);

/// <summary>
/// Saves user states from the <see cref="PropertyGrid"/> control to the registry.
/// </summary>
/// <param name="key">The registry key that contains the user states.</param>
void SaveState(RegistryKey key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13417,13 +13417,7 @@ void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
/// Indicates whether or not the control supports UIA Providers via
/// IRawElementProviderFragment/IRawElementProviderFragmentRoot interfaces
/// </summary>
internal virtual bool SupportsUiaProviders
{
get
{
return false;
}
}
internal virtual bool SupportsUiaProviders => false;

///
/// Explicit support of DropTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ internal AccessibleObject GetChildFragment(int index)
{
if (index == 0)
{
return _owningPropertyGrid.HotCommandsAccessibleObject;
return _owningPropertyGrid.CommandsPaneAccessibleObject;
}

index--;
Expand All @@ -168,7 +168,7 @@ internal AccessibleObject GetChildFragment(int index)
{
if (index == 0)
{
return _owningPropertyGrid.HelpAccessibleObject;
return _owningPropertyGrid.HelpPaneAccessibleObject;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Windows.Forms
{
public partial class PropertyGrid
{
private static class RegistryStateNames
{
public const string AlphabeticalSort = "PbrsAlpha";
public const string HelpVisible = "PbrsShowDesc";
public const string CommandsVisible = "PbrsShowCommands";
public const string CommentSizeRatio = "PbrsDescHeightRatio";
public const string CommandSizeRatio = "PbrsHotCommandHeightRatio";
}
}
}
Loading