Compartir a través de


IVsFontAndColorStorage Interface

Definition

Allows a VSPackage to retrieve or save font and color data to the registry.

public interface class IVsFontAndColorStorage
public interface class IVsFontAndColorStorage
__interface IVsFontAndColorStorage
[System.Runtime.InteropServices.Guid("40BC7B1A-E625-4DA1-86B4-7660F3CCBB16")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsFontAndColorStorage
[System.Runtime.InteropServices.Guid("40BC7B1A-E625-4DA1-86B4-7660F3CCBB16")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsFontAndColorStorage
[<System.Runtime.InteropServices.Guid("40BC7B1A-E625-4DA1-86B4-7660F3CCBB16")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsFontAndColorStorage = interface
[<System.Runtime.InteropServices.Guid("40BC7B1A-E625-4DA1-86B4-7660F3CCBB16")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsFontAndColorStorage = interface
Public Interface IVsFontAndColorStorage
Attributes

Remarks

The Visual Studio environment provides an implementation of the IVsFontAndColorStorage interface

Notes to Implementers

COM programmers can obtain an IVsFontAndColorStorage interface by calling QueryService(Guid, Guid, IntPtr) with the service ID SID_SVsFontAndColorStorage and the interface ID IID_IVsFontAndColorStorage:

CComPtr<IVsFontAndColorStorage>  pStorage;  
hr = pSP->QueryService(SID_SVsFontAndColorStorage, IID_IVsFontAndColorStorage, (void**)&pStorage);  
VSASSERT(SUCCEEDED(hr), "IVsFontAndColorStorage not provided");  

VSPackages developed using managed code can obtain an IVsFontAndColorStorage interface by calling GetService(Type) with an argument of SVsFontAndColorStorage:

IVsFontAndColorStorage store=null;  
store=GetService(typeof(SVsFontAndColorStorage)) as IVsFontAndColorStorage;  
if (store == null ){  
    throw new ApplicationException("Unable to obtain IVsFontAndColorStorage Interface");  
}  

Methods

CloseCategory()

Closes the registry key containing font and color information for the Display Items in the currently open Category.

GetFont(LOGFONTW[], FontInfo[])

Returns the font attributes for the currently open Category.

GetItem(String, ColorableItemInfo[])

Returns the user-modifiable information for a named Display Item in the currently open Category.

OpenCategory(Guid, UInt32)

Opens the registry key containing font and color information for a Cateogry found in the Show Settings for: drop-down list.

RemoveCategory(Guid)

Deletes saved data for a Category from the registry.

SetFont(FontInfo[])

Stores the basic definition of a font to be used by the currently open Category.

SetItem(String, ColorableItemInfo[])

Stores the user-modifiable color and font settings for a named Display Item in the registry.

Applies to