Share via


IBabelService::ColorCount Method

Returns the number of custom color classes.

HRESULT ColorCount ( 
   ColorClass* count
);

Parameters

  • count
    [out] Returns the number of custom color classes cast as a ColorClass (which is defined as a long).

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is called once, after the IBabelService::Init Method is called, and is only called if the RequestStockColors registry entry is set to 0 (see Babel Registry Information). If you are implementing your own custom color classes, then return the total number of color classes that you are using in the count parameter. Later, the IBabelService::GetColorInfo Method is called for each color class when colorizing source lines.

If you set the RequestStockColors registry entry to a value of 1 and return E_NOTIMPL from the IBabelService::ColorCount and IBabelService::GetColorInfo methods, then the default Babel Package color classes are used. The default color classes are text (ClassText), keyword (ClassKeyword), comment (ClassComment), identifier (ClassIdentifier), string (ClassString), and number (ClassNumber). These enumeration values are defined in ColorClass Enumeration.

See Also

Concepts

Babel Registry Information

Reference

IBabelService Interface

ColorClass Enumeration