XUICodeEditorAutocompletePopup
Inherits DesktopTextInputCanvas
Description
The customisable autocomplete popup that appears in the code editor when autocomplete options are available.
Properties
Name | Type | Read-Only |
---|---|---|
mBuffer | Picture |
|
mOwner | WeakRef |
|
mScrollPosY | Integer |
|
mSelectedIndex | Integer |
|
Owner | XUICodeEditor |
✔ |
ScrollPosY | Integer |
|
SelectedIndex | Integer |
Methods
Name | Parameters | Returns |
---|---|---|
AutocompleteOptionHeight | Integer |
|
Constructor | owner As XUICodeEditor |
|
RebuildBuffer | maxWidth As Integer , selectedIndex As Integer |
|
ScrollToSelectedIndex | ||
Update | maxWidth As Integer , maxHeight As Integer |
Constants
Name | Type |
---|---|
SELECTED_OPTION_BORDER_RADIUS | Double |
SELECTED_OPTION_H_PADDING | Double |
SELECTED_OPTION_BORDER_RADIUS As Double The border radius for the background of the currently selected autocomplete option in the popup.
SELECTED_OPTION_H_PADDING As Double The number of pixels to pad to the left and right of a selected autocomplete option in the popup.
Property Descriptions
mBuffer As Picture
The picture that represents the popup. Drawn in the Paint()
event.
mOwner As WeakRef
The code editor that owns this popup.
mScrollPosY As Integer
The vertical scroll offset. 0 is baseline. Positive indicates scrolling down. Backs the ScrollPosY
computed property.
mSelectedIndex As Integer
0-based index of the currently selected option in the popup.
Owner As XUICodeEditor
The code editor that owns this popup.
ScrollPosY As Integer
The vertical scroll offset. 0 is baseline. Positive indicates scrolling down. Refreshes the popup.
SelectedIndex As Integer
0-based index of the currently selected option in the popup.
Method Descriptions
AutocompleteOptionHeight() As Integer
Returns the height of an autocomplete option in the popup based on the owner's current theme.
Constructor(owner As XUICodeEditor)
Creates a new autocomplete popup canvas, with a weak reference to owner
.
RebuildBuffer(maxWidth As Integer, selectedIndex As Integer)
Creates the buffer that represents the popup. Assigns the buffer to mBuffer
.
ScrollToSelectedIndex()
Scrolls the popup to wholly display the selected index if it is not already. Refreshes the canvas.
Assumes SelectedIndex
is valid.
Update(maxWidth As Integer, maxHeight As Integer)
Resizes and redraws this autocomplete popup using the autocomplete data from its owner.
maxwidth
is the maximum permissable width of the popup.
maxHeight
is the maximum permissable height of the popup.