API GetGlyphInfo

Returns the information about glyphs name, glyphType, isKnown, icon, glyphId, glyphLink = GetGlyphInfo(index)

Parameters

 * index : Integer - Index of glyph as is shown in the glyph panel. For example: Druid 2=Berserk, 3=Insect swarm etc.

Returns

 * name : String - The name of the glyph or "header" if a header
 * glyphType : Integer - Type of the glyph (1 - Primal, 2 - Major, 3 - Minor)
 * isKnown : Boolean - True if the player has learned the glyph in question or a filter index if a header ( 1 - Primal, 2 - Major, 4 - Minor )
 * icon : Texture for glyph button widget or nil if a header
 * glyphId : Integer - the id of the glyph or nil if a header
 * glyphLink : Link - the link of the selected glyph or nil if a header

You can extract the link contents as follows: local _,_,_,linkType,linkId,linkName = string.find(glyphLink, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+)|?h?%[?([^%[%]]*)%]?|?h?|?r?") Convents this '|cff66bbff|Hglyph:272|h[Glyph of Incinerate]|h|r' to 66bbff, glyph, 272, Glyph of Incinerate

Related Functions

 * (isKnown) : Returns false if header is collapsed and true if expanded
 * (isKnown) : Toggles the expand and collapse state of the header