Table of Contents

Class TooltipGenerator

Namespace
Dassie.Text.Tooltips
Assembly
dstx.dll

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

type TypeInfo

The 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

ctor ConstructorInfo

The 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

type Type
parameters List<(Type Type, string Name)>

Returns

Tooltip

The generated tooltip.

EnumField(FieldInfo)

Generates a tooltip for an enumeration member.

public static Tooltip EnumField(FieldInfo field)

Parameters

field FieldInfo

The 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

field FieldInfo

The 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

method MethodInfo

The MethodInfo representing the function.

intrinsic bool

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

name string
returnType Type
parameters Parameter[]
intrinsic bool
translatedWords Dictionary<string, string>

Returns

Tooltip

Local(string, bool, LocalVariableInfo)

Generates a tooltip for a local value.

public static Tooltip Local(string name, bool mutable, LocalVariableInfo local)

Parameters

name string

The name of the local.

mutable bool

Wheter the local is mutable.

local LocalVariableInfo

The 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

name string

The 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

name string

The name of the parameter.

type Type

The type of the parameter.

Returns

Tooltip

The generated tooltip.

Property(PropertyInfo)

Generates a tooltip for a property.

public static Tooltip Property(PropertyInfo property)

Parameters

property PropertyInfo

The 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

type TypeInfo

The type to generate a tooltip for.

showBaseType bool

Wheter to include the base type in the tooltip.

omitNamespace bool

If true, omits the namespace of the type from the tooltip.

noModifiers bool

If true, hides all type modifiers from the tooltip.

doc Tooltip

Optional XML documentation of the type.

ignoreBuiltinAliases bool

Wheter to ignore built-in type aliases.

Returns

Tooltip

Returns the generated tooltip.