We can use the undocumented function styleMenuStyles
to get the list of styles for a particular notebook:
StyleManager`OpenStyleManager; (* to autoload symbols *)
EvaluationNotebook[] // NotebookTools`StylesheetsDump`styleMenuStyles // Map[First]
(*
{"Title", "Chapter", "Subchapter", "Section", "Subsection",
"Subsubsection", "Text", "Code", "Input", "Output", "Subtitle",
"Subsubtitle", "Item", "ItemParagraph", "Subitem",
"SubitemParagraph", "Subsubitem", "SubsubitemParagraph",
"ItemNumbered", "SubitemNumbered", "SubsubitemNumbered",
"InlineFormula", "DisplayFormula", "DisplayFormulaNumbered",
"Program"}
*)
Similar undocumented style-related functions are discussed in (71301).
Internally, styleMenuStyles
uses a two-argument form of the function FEPrivate`GetPopUpList
that Kuba noted in a comment. Essentially:
FEPrivate`GetPopupList[EvaluationNotebook[], "MenuListStyles"] //
FE`Evaluate //
Cases[_[s_String, _] :> s]
FE`Evaluate[FEPrivate`GetPopupList["MenuListStyles"]]//Column
but I don't know how to use it for other than parent notebook. (8606) $\endgroup$