s&box docs

public abstract class Editor.GraphicsItem

Constructors

Showing 1 constructors

Methods

Showing 24 methods

public Sandbox.Bind.Builder Bind(string targetName)

public virtual bool Contains(Vector2 localPos)

public void Destroy()

protected virtual void OnDestroy()

protected virtual void OnKeyPress(Editor.KeyEvent e)

A key has been pressed.

protected virtual void OnKeyRelease(Editor.KeyEvent e)

A key has been released.

protected virtual void OnMousePressed(Editor.GraphicsMouseEvent e)

Implementations

protected virtual void OnMoved()

Item has been moved by the user dragging it

Implementations

protected virtual void OnPaint()

Implementations

protected virtual void OnPositionChanged()

protected virtual void OnSelectionChanged()

public void PrepareGeometryChange()

Usually called before resizing items so they paint properly.

public void Update()

Properties

Showing 28 properties

public virtual Sandbox.Rect Editor.GraphicsItem.BoundingRect { get; set; }

The outer bounds of the item as a rectangle; all painting must be restricted to inside an item's bounding rect.

public bool Editor.GraphicsItem.Focusable { get; set; }

Gets keyboard input

public virtual Vector2 Editor.GraphicsItem.HandlePosition { get; set; }

0,0 means top left, 1,1 means bottom right

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.GraphicsItem

On this page

Constructorspublic GraphicsItem(Editor.GraphicsItem parent = null)Methodspublic Sandbox.Bind.Builder Bind(System.String targetName)public virtual System.Boolean Contains(Vector2 localPos)public System.Void Destroy()public Vector2 FromItem(Editor.GraphicsItem item, Vector2 pos)public Vector2 FromParent(Vector2 pos)public Vector2 FromScene(Vector2 pos)protected virtual System.Void OnDestroy()protected virtual System.Void OnHoverEnter(Editor.GraphicsHoverEvent e)protected virtual System.Void OnHoverLeave(Editor.GraphicsHoverEvent e)protected virtual System.Void OnHoverMove(Editor.GraphicsHoverEvent e)protected virtual System.Void OnKeyPress(Editor.KeyEvent e)protected virtual System.Void OnKeyRelease(Editor.KeyEvent e)protected virtual System.Void OnMouseMove(Editor.GraphicsMouseEvent e)protected virtual System.Void OnMousePressed(Editor.GraphicsMouseEvent e)protected virtual System.Void OnMouseReleased(Editor.GraphicsMouseEvent e)protected virtual System.Void OnMoved()protected virtual System.Void OnPaint()protected virtual System.Void OnPositionChanged()protected virtual System.Void OnSelectionChanged()public System.Void PrepareGeometryChange()public Vector2 ToItem(Editor.GraphicsItem item, Vector2 pos)public Vector2 ToParent(Vector2 pos)public Vector2 ToScene(Vector2 pos)public System.Void Update()Propertiespublic virtual Sandbox.Rect Editor.GraphicsItem.BoundingRect { get; set; }public Vector2 Editor.GraphicsItem.Center { get; set; }public System.Collections.Generic.IEnumerable`1<Editor.GraphicsItem> Editor.GraphicsItem.Children { get; set; }public System.Boolean Editor.GraphicsItem.Clip { get; set; }public System.Boolean Editor.GraphicsItem.ClipChildren { get; set; }public Editor.CursorShape Editor.GraphicsItem.Cursor { get; set; }public System.Boolean Editor.GraphicsItem.Focusable { get; set; }public Editor.GraphicsView Editor.GraphicsItem.GraphicsView { get; set; }public virtual Vector2 Editor.GraphicsItem.HandlePosition { get; set; }public System.Single Editor.GraphicsItem.Height { get; set; }public System.Boolean Editor.GraphicsItem.Hovered { get; set; }public System.Boolean Editor.GraphicsItem.HoverEvents { get; set; }public System.Boolean Editor.GraphicsItem.IsValid { get; set; }public Sandbox.Rect Editor.GraphicsItem.LocalRect { get; set; }public System.Boolean Editor.GraphicsItem.Movable { get; set; }public Editor.GraphicsItem Editor.GraphicsItem.Parent { get; set; }public Vector2 Editor.GraphicsItem.Position { get; set; }public System.Single Editor.GraphicsItem.Rotation { get; set; }public System.Single Editor.GraphicsItem.Scale { get; set; }public Sandbox.Rect Editor.GraphicsItem.SceneRect { get; set; }public System.Boolean Editor.GraphicsItem.Selectable { get; set; }public System.Boolean Editor.GraphicsItem.Selected { get; set; }public virtual Vector2 Editor.GraphicsItem.Size { get; set; }public System.String Editor.GraphicsItem.Tooltip { get; set; }public System.String Editor.GraphicsItem.ToolTip { get; set; }public Vector2 Editor.GraphicsItem.ViewPosition { get; set; }public System.Single Editor.GraphicsItem.Width { get; set; }public System.Single Editor.GraphicsItem.ZIndex { get; set; }Metadata