XUIInspectorItemPopupMenu
Description
Represents a popup menu in the inspector.
Properties
Name | Type | Read-Only |
---|---|---|
Anchor | XUIInspectorItemPopupMenu.Anchors |
|
AnchorX | Double |
|
Bounds | Rect |
|
ItemBounds() | Rect |
|
Items() | String |
|
mOwner | WeakRef |
|
Owner | XUIInspectorItem |
|
PreferredBottomY | Double |
|
PreferredTopY | Double |
|
SelectedIndex | Integer |
Methods
Name | Parameters | Returns |
---|---|---|
Constructor | owner As XUIInspectorItem , items() As String , selectedIndex As Integer , anchorX As Double , anchorSide As XUIInspectorItemPopupMenu.Anchors , preferredTopY As Double , preferredBottomY As Double |
|
Render | g As Graphics , style As XUIInspectorStyle , yScrollOffset As Double |
|
RenderIndicator | g As Graphics , x As Double , y As Double , selected As Boolean , style As XUIInspectorStyle |
|
RequiredHeight | g As Graphics , style As XUIInspectorStyle |
Double |
RequiredWidth | g As Graphics , style As XUIInspectorStyle |
Double |
Constants
Name | Type |
---|---|
HPADDING | Double |
INDICATOR_ITEM_PADDING | Double |
INDICATOR_SIZE | Double |
ITEM_VPADDING | Double |
HPADDING As Double The number of pixels to pad the items laterally.
INDICATOR_ITEM_PADDING As Double The number of pixels between the right edge of the indicator and the left edge of an item.
INDICATOR_SIZE As Double The size of the indicator.
ITEM_VPADDING As Double The number of pixels to pad above and below each item in the popup menu.
Enumerations
Anchors
Which side of the popup menu is anchored.
Name |
---|
Left |
Right |
Property Descriptions
Anchor As XUIInspectorItemPopupMenu.Anchors
Which side of the popup menu is anchored.
AnchorX As Double
The desired x coordinate of the anchored edge of the popup menu. The inspector will determine its vertical position.
Bounds As Rect
The bounds of this popup menu.
ItemBounds() As Rect
The bounds of each item in the popup menu.
Items() As String
The items in the popup menu.
mOwner As WeakRef
A weak reference to this popup menu's owning item.
Owner As XUIInspectorItem
A weak reference to this popup menu's owning item.
PreferredBottomY As Double
If there is insufficient space to use preferredTopY
then the inspector will try to draw the popup menu with its bottom edge at preferredBottomY
.
PreferredTopY As Double
The preferred y coordinate of the top of the popup menu. If there is enought space, the inspector will draw the top of the popup menu here.
SelectedIndex As Integer
The 0-based index of the currently selected item.
Method Descriptions
Constructor(owner As XUIInspectorItem, items() As String, selectedIndex As Integer, anchorX As Double, anchorSide As XUIInspectorItemPopupMenu.Anchors, preferredTopY As Double, preferredBottomY As Double)
Constructs a new popup menu containing items
with selectedIndex
selected.
anchorX
specifies where the popup should be anchored horizontally and anchorSide
specifies
whether the anchor applies to the left or right side of the popup menu.
The inspector ultimately decides where the popup is placed but you can indicate a preferred top
and bottom Y
coordinate.
Render(g As Graphics, style As XUIInspectorStyle, yScrollOffset As Double)
Renders is popup menu to g
.
Preserves the state of g
.
yScrollOffset will offset the drawing in the vertical direction.
RenderIndicator(g As Graphics, x As Double, y As Double, selected As Boolean, style As XUIInspectorStyle)
Renders the indicator icon to g
.
Preserves the state of g
RequiredHeight(g As Graphics, style As XUIInspectorStyle) As Double
Returns the height required to draw this popup menu. Expensive operation.
RequiredWidth(g As Graphics, style As XUIInspectorStyle) As Double
Returns the width required to draw this popup menu. Expensive operation.