PropertiesSectionItem

Package: Libraries.Interface.Controls.Scenes · Inherits from: Libraries.Interface.Controls.TreeItem, Libraries.Interface.Item, Libraries.Interface.Controls.Control, Libraries.Interface.Item2D, Libraries.Language.Object

A PropertiesSectionItem is the header of a section in a scene editor's Properties panel, such as "Materials" or "Physics", when the panel shows two or more sections. It is a tree item, alone in its own tree, so it looks, reads and works like the scene tree's items: the tree's arrow, Right to open, Left to close, Enter to switch, and screen readers hear it as a tree item that is expanded or collapsed. It has no tree items under it. Opening and closing it opens and closes its section's controls instead.

Example Code

use Libraries.Interface.Controls.Scenes.PropertiesSectionItem

PropertiesSectionItem header
header:SetName("Materials")

Actions

Activate(Libraries.Interface.Events.BehaviorEvent event)

Enter on the header opens or closes it.

Parameters

ClickedMouse()

Clicking the header's name opens or closes it, as clicking the arrow does.

Close()

Closes the section, leaving only this header.

GetDialog()

Returns the section this header opens and closes.

Returns

Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog: The section

GetSize()

Counts the section as the one thing under the header, so the tree draws the arrow.

Returns

integer: 1

IsOpen()

Returns true if the section is open.

Returns

boolean: True if open

IsSubtree()

A header always has a section under it, so it is always one that opens and closes, as a tree item with items under it is.

Returns

boolean: True

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

Draws the header, with its arrow showing whether it is open.

Parameters

OnDoubleClick(Libraries.Interface.Events.BehaviorEvent event)

A double click is two clicks, and each click already opens or closes the header, so a double click does nothing more.

Parameters

Open()

Opens the section, showing its controls.

SelectLastElement()

The header is the last item of its own tree, open or closed.

SelectionDown()

Down leaves the header for the next stop in the Tab order: the section's first field when it is open, or the next section when it is closed. The section's fields aren't tree items, so the tree's own Down has nowhere to go.

SelectionUp()

Up leaves the header for the previous stop in the Tab order: the end of the section above.

SetDialog(Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog dialog)

Sets the section this header opens and closes.

Parameters

ShowOpen(boolean open)

Shows the header as open or closed, without opening or closing the section. The section calls it when it opens or closes by itself, such as from a saved setting or a key.

Parameters

  • open boolean: True for open

Switch()

Opens a closed section, or closes an open one.

UnfocusedSelection()

When its tree loses the focus, the header looks as it does unselected. It is the only item in its tree, so it stays selected; a tree shows its selection while unfocused with a dark band, which on a header would stay after the focus moved on. The band comes back with the focus (Tree:GainedFocus).

Inherited Actions

253 actions from Libraries.Interface.Controls.Control
43 actions from Libraries.Interface.Controls.TreeItem
58 actions from Libraries.Interface.Item
201 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object