PropertiesFoldItem

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 PropertiesFoldItem is the header of a part inside a section of the scene editor's Properties panel, such as the Water section's Sea, Lakes, one lake, or Look. Like a section's own header (PropertiesSectionItem), it is a tree item alone in its own tree, with the tree's chevron: Right opens it, Left closes it, Enter or a click switches it, and screen readers hear it as a tree item that is expanded or collapsed. It doesn't hide anything itself: opening or closing it tells its section, with the number it was given, and the section shows or hides that part (PropertiesDialog:FoldChanged).

Example Code

use Libraries.Interface.Controls.Scenes.PropertiesFoldItem

PropertiesFoldItem lakes
lakes:SetName("Lakes (2)")

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 chevron does.

Close()

Closes the part, leaving only this header.

GetKey()

Returns the number the section knows this part by.

Returns

integer: The number

GetSize()

Counts the part as the one thing under the header, so the tree draws the chevron.

Returns

integer: 1

IsOpen()

Returns true if the part is open.

Returns

boolean: True if open

IsSubtree()

A header always has a part under it, so it opens and closes.

Returns

boolean: True

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

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

Parameters

OnDoubleClick(Libraries.Interface.Events.BehaviorEvent event)

Each click already switches the header, so a double click does nothing more.

Parameters

Open()

Opens the part.

SelectLastElement()

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

SelectionDown()

Down goes to the next stop in the section's Tab order.

SelectionUp()

Up goes to the previous stop in the section's Tab order.

SetFold(Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog dialog, integer partKey)

Sets the section this header belongs to, and the number the section knows this part by.

Parameters

ShowOpen(boolean open)

Shows the header as open or closed, without telling the section.

Parameters

  • open boolean: True for open

Switch()

Opens a closed part, 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