Class TooltipGenerator
Provides functionality for generating tooltips for objects to be used in editors.
public static class TooltipGenerator
- Inheritance
-
TooltipGenerator
- Inherited Members
Methods
ColorForType(TypeInfo)
Returns the appropriate Color for the specified type.
public static Color ColorForType(TypeInfo type)
Parameters
typeTypeInfoThe type to get a color for.
Returns
- Color
The appropriate color.
Constructor(ConstructorInfo)
Generates a tooltip for a constructor.
public static Tooltip Constructor(ConstructorInfo ctor)
Parameters
ctorConstructorInfoThe ConstructorInfo representing the constructor.
Returns
- Tooltip
The generated tooltip.
Constructor(Type, List<(Type Type, string Name)>)
Generates a tooltip for a constructor.
public static Tooltip Constructor(Type type, List<(Type Type, string Name)> parameters)
Parameters
Returns
- Tooltip
The generated tooltip.
EnumField(FieldInfo)
Generates a tooltip for an enumeration member.
public static Tooltip EnumField(FieldInfo field)
Parameters
fieldFieldInfoThe enum member to generate a tooltip for.
Returns
- Tooltip
The generated tooltip.
Field(FieldInfo)
Generates a tooltip for a field.
public static Tooltip Field(FieldInfo field)
Parameters
fieldFieldInfoThe field to generate a tooltip for.
Returns
- Tooltip
The generated tooltip.
Function(MethodInfo, bool)
Generates a tooltip for a function.
public static Tooltip Function(MethodInfo method, bool intrinsic = false)
Parameters
methodMethodInfoThe MethodInfo representing the function.
intrinsicbool
Returns
- Tooltip
The generated tooltip.
Function(string, Type, Parameter[], bool, Dictionary<string, string>)
Generates a tooltip for a function.
public static Tooltip Function(string name, Type returnType, Parameter[] parameters, bool intrinsic = false, Dictionary<string, string> translatedWords = null)
Parameters
namestringreturnTypeTypeparametersParameter[]intrinsicbooltranslatedWordsDictionary<string, string>
Returns
Local(string, bool, LocalVariableInfo)
Generates a tooltip for a local value.
public static Tooltip Local(string name, bool mutable, LocalVariableInfo local)
Parameters
namestringThe name of the local.
mutableboolWheter the local is mutable.
localLocalVariableInfoThe local to generate a tooltip for.
Returns
- Tooltip
The generated tooltip.
Namespace(string)
Generates a tooltip for a namespace.
public static Tooltip Namespace(string name)
Parameters
namestringThe name of the namespace.
Returns
- Tooltip
The generated tooltip.
Parameter(string, Type)
Generates a tooltip for a parameter.
public static Tooltip Parameter(string name, Type type)
Parameters
Returns
- Tooltip
The generated tooltip.
Property(PropertyInfo)
Generates a tooltip for a property.
public static Tooltip Property(PropertyInfo property)
Parameters
propertyPropertyInfoThe property to generate a tooltip for.
Returns
- Tooltip
The generated tooltip.
Type(TypeInfo, bool, bool, bool, Tooltip, bool)
Generates a tooltip for a type.
public static Tooltip Type(TypeInfo type, bool showBaseType, bool omitNamespace = false, bool noModifiers = false, Tooltip doc = null, bool ignoreBuiltinAliases = false)
Parameters
typeTypeInfoThe type to generate a tooltip for.
showBaseTypeboolWheter to include the base type in the tooltip.
omitNamespaceboolIf true, omits the namespace of the type from the tooltip.
noModifiersboolIf true, hides all type modifiers from the tooltip.
docTooltipOptional XML documentation of the type.
ignoreBuiltinAliasesboolWheter to ignore built-in type aliases.
Returns
- Tooltip
Returns the generated tooltip.