Skip to content

XUIInspectorSection

Description

Represents a section in the inspector.

Properties

Name Type Read-Only
Bounds Rect
Collapsible Boolean
DisclosureBounds Rect
Expanded Boolean
mCollapsible Boolean
mExpanded Boolean
mItems() XUIInspectorItem
mOwner WeakRef
Name String
Owner XUIInspector

Methods

Name Parameters Returns
AddItem item As XUIInspectorItem
AddItemAt index As Integer, item As XUIInspectorItem
Constructor name As String, collapsible As Boolean, expanded As Boolean
FirstItemThatCanAcceptTabFocus XUIInspectorItem
Height style As XUIInspectorStyle Double
MouseDown x As Integer, y As Integer, clickType As XUI.ClickTypes XUIInspectorMouseDownData
MouseMoved x As Double, y As Double XUIInspectorMouseMoveData
MouseUp x As Integer, y As Integer, clickType As XUI.ClickTypes XUIInspectorMouseUpData
MoveFocusToNextItem currentItemWithFocus As XUIInspectorItem XUIInspectorItem
Remove item As XUIInspectorItem
RemoveAt index As Integer
Render g As Graphics, x As Double, y As Double, style As XUIInspectorStyle Double
RenderDisclosureWidget sectionTop As Double, g As Graphics, style As XUIInspectorStyle Rect
RenderItems g As Graphics, x As Double, y As Double, width As Double, style As XUIInspectorStyle Double

Constants

Name Type
DISCLOSURE_OFFSET_FROM_BOTTOM Double
DISCLOSURE_RPADDING Double
DOWN_DISCLOSURE_OFFSET_FROM_BOTTOM Double
HEADER_BOTTOM_PADDING Double
HEADER_HEIGHT Double
HEADER_HPADDING Double

DISCLOSURE_OFFSET_FROM_BOTTOM As Double The number of pixels the bottom of the disclosure widget is offset from the bottom edge of the section header.


DISCLOSURE_RPADDING As Double The number of pixels to pad the right edge of the disclosure widget from the right edge of the section.


DOWN_DISCLOSURE_OFFSET_FROM_BOTTOM As Double The number of pixels the bottom of the down disclosure widget is offset from the bottom edge of the section header.


HEADER_BOTTOM_PADDING As Double The number of pixels to padd between the bottom of the section header and the top of the first item.


HEADER_HEIGHT As Double The height of a section's header.


HEADER_HPADDING As Double The horizontal padding within a section's header.


Property Descriptions

Bounds As Rect

The bounds of this section within the inspector.


Collapsible As Boolean

If True then this section can be expanded and collapsed. If False then the section is always expanded.


DisclosureBounds As Rect

The bounds of this section's disclosure widget for expanding / collapsing the section. Will be Nil if the section is not collapsible.


Expanded As Boolean

Whether or not this section is expanded or collapsed.


mCollapsible As Boolean

If True then this section can be expanded and collapsed. If False then the section is always expanded.


mExpanded As Boolean

Whether or not this section is expanded or collapsed.


mItems() As XUIInspectorItem

The items within this section. They are rendered in index order. That is Items(0) is rendered first, at the top of the section.


mOwner As WeakRef

A weak reference to the inspector that owns this section.


Name As String

The name of this section.


Owner As XUIInspector

A weak reference to the inspector that owns this section. May be Nil.


Method Descriptions

AddItem(item As XUIInspectorItem)

Appends item to the end of this section.


AddItemAt(index As Integer, item As XUIInspectorItem)

Adds item at the specified index. Raises an OutOfBoundsException if index is out of bounds.


Constructor(name As String, collapsible As Boolean, expanded As Boolean)

Constructs a new section.


FirstItemThatCanAcceptTabFocus() As XUIInspectorItem

Returns the first item in this section that can accept tab focus or Nil if none are able to.


Height(style As XUIInspectorStyle) As Double

Returns the current height of the section, factoring in whether it is collapsed or expanded.


MouseDown(x As Integer, y As Integer, clickType As XUI.ClickTypes) As XUIInspectorMouseDownData

Tells the section that a mouse down event has occurred within its bounds. x, y are the absolute coordinates relative to the inspector (adjusted for scrolling). Returns a MouseDownData instance instructing the inspector how to handle the event or Nil if the the click didn't happen in this section.


MouseMoved(x As Double, y As Double) As XUIInspectorMouseMoveData

The mouse has just moved over this section. Returns Nil if no items were moved over otherwise returns data about the item moved over.


MouseUp(x As Integer, y As Integer, clickType As XUI.ClickTypes) As XUIInspectorMouseUpData

Tells the section that a mouse up event has occurred within its bounds. x, y are the absolute coordinates relative to the inspector (adjusted for scrolling). Returns a MouseUpData instance instructing the inspector how to handle the event or Nil if the the click didn't happen in this section.


MoveFocusToNextItem(currentItemWithFocus As XUIInspectorItem) As XUIInspectorItem

Returns the next item that can receive tab focus given currentItemWithFocus or Nil if there is no item in this section after currentItemWithFocus that can receive tab focus.


Remove(item As XUIInspectorItem)

Removes item from this section if found.


RemoveAt(index As Integer)

Removes the item at index. Raises an OutOfBoundsException if index in invalid.


Render(g As Graphics, x As Double, y As Double, style As XUIInspectorStyle) As Double

Renders this section to g with its top-left corner at x, y. Returns the location to draw the next section's top-left corner.

Assumes the owning inspector is not Nil.


RenderDisclosureWidget(sectionTop As Double, g As Graphics, style As XUIInspectorStyle) As Rect

Renders the section disclosure widget to g in the header and returns its hit bounds.


RenderItems(g As Graphics, x As Double, y As Double, width As Double, style As XUIInspectorStyle) As Double

Renders this section's items to g. The first item's top-left corner is at x, y. Returns the y position of the bottom of the last item.