New-SlideTree
Adds a hierarchical tree to a slide.
SYNOPSIS
Adds a hierarchical tree to a slide.
SYNTAX
__AllParameterSets
New-SlideTree [-Label] <string> [-Body] <scriptblock> [-Guide <SlideTreeGuide>]
[-GuideColor <string>] [-Collapsed] [-HPadding <int>] [-VPadding <int>]
ALIASES
This cmdlet has no aliases.
DESCRIPTION
Adds a hierarchical tree to a slide. The Body script block contributes child nodes through nested
New-SlideTreeNode calls. Labels support Spectre.Console markup.
EXAMPLES
Example 1: A source tree
New-SlideTree -Label 'src' -Body {
New-SlideTreeNode -Label 'Cmdlets'
New-SlideTreeNode -Label 'Model' -Body {
New-SlideTreeNode -Label 'Widgets'
}
}
Renders a tree rooted at src with a nested Model/Widgets branch.
PARAMETERS
-Body
The script block whose New-SlideTreeNode calls build the tree.
Type: System.Management.Automation.ScriptBlock
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Collapsed
Renders the top-level nodes collapsed.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Guide
The branch guide glyph style. The default is Line.
Type: PSSlideShow.Model.SlideTreeGuide
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-GuideColor
The guide line color, given as a color name or hex value. Defaults to the low-contrast chrome style.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-HPadding
Left/right padding, in cells, around the widget. The default is 0.
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Label
The root label. Supports Spectre.Console markup.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-VPadding
Top/bottom padding, in rows, around the widget. The default is 1.
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
PSSlideShow.Model.TreeWidget
A tree widget to be emitted inside a New-Slide content block.
NOTES
Build the tree with New-SlideTreeNode calls inside the Body block; nodes emitted elsewhere are
ignored.