Udostępnij za pośrednictwem


IVsFontAndColorEvents Interface

Definition

Notifies VSPackages using font and color information about changes in font and color settings.

public interface class IVsFontAndColorEvents
public interface class IVsFontAndColorEvents
__interface IVsFontAndColorEvents
[System.Runtime.InteropServices.Guid("F73E1D1E-3D1B-44F0-B736-D59F960B7F9E")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsFontAndColorEvents
[System.Runtime.InteropServices.Guid("F73E1D1E-3D1B-44F0-B736-D59F960B7F9E")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsFontAndColorEvents
[<System.Runtime.InteropServices.Guid("F73E1D1E-3D1B-44F0-B736-D59F960B7F9E")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsFontAndColorEvents = interface
[<System.Runtime.InteropServices.Guid("F73E1D1E-3D1B-44F0-B736-D59F960B7F9E")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsFontAndColorEvents = interface
Public Interface IVsFontAndColorEvents
Attributes

Remarks

Implementing IVsFontAndColorEvents is not required. However, if it is not implemented, VSPackages must explicitly poll for changes in font and color settings using the GetItem or GetItem methods.

Fonts and Colors Events are broadcast when:

  • Font or color attributes are changed,

  • Font or color setting are reset to their defaults, or

  • The Options dialog box in the Tools menu is closed.

It is not necessary to advise the environment that a process is handling IVsFontAndColorEvents, because the Fonts and Colors property page uses the list of categories in the registry to poll all services implementing fonts and color support.

Notes to Implementers

Implement the IVsFontAndColorEvents interface if you want the environment to call the VSPackage whenever the fonts and colors setting for a Category it manages changes. These changes can be initiated programmatically or through the Fonts and Colors property page.

Methods

OnApply()

Called by the environment when user has clicked the OK or Apply button on the Fonts and Colors property page in the Options dialog box.

OnFontChanged(Guid, FontInfo[], LOGFONTW[], IntPtr)
OnFontChanged(Guid, FontInfo[], LOGFONTW[], UInt32)

Called by the Visual Studio environment when the fonts of one Categories of the items listed in the Display Items drop-down list is modified.

OnItemChanged(Guid, String, Int32, ColorableItemInfo[], UInt32, UInt32)

Called by the environment whenever an item in the Display Items drop-down list is modified.

OnReset(Guid)

Called by the environment whenever the items in the Display Items list are reset to their default values.

OnResetToBaseCategory(Guid)

Called by the environment whenever all of a category's attributes are reset to its alternate set of default values, as specified by its base category.

Applies to