s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Editor Classes
BaseItemWidget
chevron_left
Editor Classes
class
BaseItemWidget
search
Constructors
functions
BaseItemWidget
Fields
lock
_items
lock
ItemLayouts
Properties
data_object
BodyContextMenu
data_object
BodyDropTarget
data_object
CanvasRect
data_object
CurrentItemDragEvent
data_object
DragDropTargetClosestThreshold
data_object
ItemActivated
data_object
ItemClicked
data_object
ItemContextMenu
data_object
ItemDeselected
data_object
ItemDrag
data_object
ItemHoverEnter
data_object
ItemHoverLeave
data_object
ItemPaint
data_object
Items
remove_circle
ItemsDeselected
data_object
ItemSelected
remove_circle
ItemsSelected
data_object
Margin
data_object
MultiSelect
data_object
OnBeforeDeselection
data_object
OnBeforeSelection
data_object
OnSelectionChanged
data_object
ProvidesDebugMode
data_object
SelectedItems
data_object
Selection
data_object
SelectionOverride
lock
TimeMsPaint
lock
timeMsRebuild
data_object
ToggleSelect
Methods
functions
AddItem
functions
AddItems
functions
Clear
functions
Dirty
lock
FindItemsThatStartWith
lock
FindVirtualWidget
lock
GetAtIndex
lock
GetDragItem
functions
GetItemAt
lock
GetTooltip
functions
IsSelected
lock
ItemIndex
lock
OnBodyDragDrop
functions
OnDestroyed
lock
OnDoubleClick
functions
OnDragDrop
functions
OnDragHover
lock
OnDragHoverItem
lock
OnDragItem
functions
OnDragLeave
lock
OnDragStart
lock
OnDropOnItem
lock
OnHoverChanged
lock
OnItemActivated
lock
OnItemContextMenu
lock
OnItemDrag
lock
OnItemPressed
lock
OnKeyPress
lock
OnKeyPressOnItem
lock
OnLayoutChanged
lock
OnMouseMove
lock
OnMousePress
lock
OnMouseReleased
lock
OnPaint
lock
OnResize
lock
OnScrollChanged
lock
OnSelectionAdded
lock
OnShortcutPressed
lock
PaintItem
lock
PaintItemDebug
lock
Rebuild
functions
RemoveItem
lock
ResolveObject
functions
ScrollTo
lock
SelectAll
functions
SelectItem
functions
SelectItems
functions
SelectItemStartingWith
functions
SelectMove
functions
SelectMoveColumn
functions
SelectMoveRow
lock
SelectTo
functions
SetItems
lock
SetSelected
functions
UnselectAll
functions
UnselectItem
functions
UpdateIfDirty
BaseItemWidget
class
Editor
.
account_tree
extends
BaseScrollWidget
Sandbox.Tools
build
Constructors
1
BaseItemWidget
(
parent
)
crop_din
Fields
2
_items
List`1
ItemLayouts
HashSet`1
data_object
Properties
29
BodyContextMenu
Action
Called when right clicking on the item's parent.
BodyDropTarget
DragDropTarget
What shall we do if they drag something in and it's not over an item?
CanvasRect
Rect
The inner of LocalRect with Margin
CurrentItemDragEvent
ItemDragEvent
DragDropTargetClosestThreshold
float
Gets or sets the maximum distance, in pixels, at which a target is considered close enough for drag-and-drop when in BodyDropTarget.Closest mode. operations.
ItemActivated
Action`1
Called when an item is double left clicked.
ItemClicked
Action`1
Called when an item is clicked.
ItemContextMenu
Action`1
Called when an item is right clicked.
ItemDeselected
Action`1
Called when an item is no longer selected.
ItemDrag
Func`2
Called to see whether or not we can drag a specific item.
ItemHoverEnter
Action`1
Called when an item is hovered by the user's cursor.
ItemHoverLeave
Action`1
Called when an item is no longer hovered by the user's cursor.
ItemPaint
Action`1
Used to overwrite an item's style
Items
IEnumerable`1
ItemsDeselected
obsolete
Action`1
Multiple items have been deselected
ItemSelected
Action`1
Called when an item is selected.
ItemsSelected
obsolete
Action`1
Multiple items have been selected
Margin
Margin
MultiSelect
bool
Whether to allow selecting multiple items at once.
OnBeforeDeselection
Action`1
Called before selection is changed on deselection. When multiple items are affected this will only be called once.
OnBeforeSelection
Action`1
Called before selection is changed on selection. When multiple items are affected this will only be called once.
OnSelectionChanged
Action`1
Called when selection has changed. When multiple items are affected this will only be called once.
ProvidesDebugMode
bool
SelectedItems
IEnumerable`1
Selected items.
Selection
SelectionSystem
SelectionOverride
Func`1
Can override an item's selection here.
TimeMsPaint
float
timeMsRebuild
float
ToggleSelect
bool
If set, selecting an item will not deselect all already selected items, clicking a selected item will deselect it.
functions
Methods
57
AddItem
(
item
)
T
Add given item to this widget.
AddItems
(
items
)
Clear
(
)
Remove all items.
Dirty
(
dirtyObject
)
FindItemsThatStartWith
(
text
)
IEnumerable`1
FindVirtualWidget
(
obj
)
VirtualWidget
Given an object, try to find the virtual widget. This can of course return null if the item isn't visible
GetAtIndex
(
i
)
object
Returns the item at given index, or null.
GetDragItem
(
ev
)
VirtualWidget
Get the virtual item to use as a drop target for a given drag event
GetItemAt
(
localPosition
)
VirtualWidget
Get the virtual item at this local position.
GetTooltip
(
obj
)
string
Called to retrieve a tooltip for given item.
IsSelected
(
obj
)
bool
Return true if this item is selected.
ItemIndex
(
item
)
int
Returns the index of given item.
OnBodyDragDrop
(
ev
)
DropAction
Called when a drag drop is being dropped onto the canvas
OnDestroyed
(
)
OnDoubleClick
(
e
)
OnDragDrop
(
ev
)
OnDragHover
(
ev
)
OnDragHoverItem
(
ev
,
item
)
Called when a dragged item is being hovered over this widget. This is the place to make drag and drop previews.
OnDragItem
(
item
)
bool
Called when we start to drag an item.
OnDragLeave
(
)
OnDragStart
(
)
OnDropOnItem
(
ev
,
item
)
Called when an item is drag and dropped onto this widget.
OnHoverChanged
(
oldHover
,
newHover
)
Hover has changed, neither of these objects are guaranteed to be non null.
OnItemActivated
(
item
)
OnItemContextMenu
(
pressedItem
,
e
)
The item has been right clicked
OnItemDrag
(
e
)
DropAction
Called when a dragged item is being hovered over this widget. This is the place to make drag and drop previews.
OnItemPressed
(
pressedItem
,
e
)
bool
Allows over-riding mouse press on an item, without click or selection. Return true to allow default behavior.
OnKeyPress
(
e
)
OnKeyPressOnItem
(
e
,
item
)
A key has been pressed on this selected item.
OnLayoutChanged
(
)
OnMouseMove
(
e
)
OnMousePress
(
e
)
OnMouseReleased
(
e
)
OnPaint
(
)
OnResize
(
)
OnScrollChanged
(
)
OnSelectionAdded
(
item
)
OnShortcutPressed
(
e
)
PaintItem
(
item
)
PaintItemDebug
(
item
)
Rebuild
(
)
Rebuild the panel layout.
RemoveItem
(
item
)
Remove given item from this widget.
ResolveObject
(
obj
)
object
For derived classes where the object is wrapped in another class (i.e. TreeView)
ScrollTo
(
target
)
Ensure that given item is in view, scrolling to it if necessary.
SelectAll
(
skipEvents
)
SelectItem
(
obj
,
add
,
skipEvents
)
Select given item.
SelectItems
(
items
,
add
,
skipEvents
)
SelectItemStartingWith
(
text
)
SelectMove
(
i
)
bool
Move the selection pointer by this many positions.
SelectMoveColumn
(
positions
)
bool
SelectMoveRow
(
positions
)
bool
SelectTo
(
item
,
skipEvents
)
Select everything between the current selection pointer and this one.
SetItems
(
items
)
SetSelected
(
obj
,
state
,
skipEvents
)
Set the selection state of an item.
UnselectAll
(
skipEvents
)
Unselects all items that are currently selected (if any)
UnselectItem
(
obj
,
skipEvents
)
Unselect given item.
UpdateIfDirty
(
)
Inheritance
QObject
Widget
Frame
BaseScrollWidget
BaseItemWidget
ListView
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.