internal override void ApplyTo(FocusController focusController, Focusable f) { // Unselect selected TextElement on pointer down. focusController.selectedTextElement = null; f.Focus(); // Call Focus() virtual method when an element is clicked or otherwise focused explicitly. }
public Panel(ScriptableObject ownerObject, ContextType contextType, EventDispatcher dispatcher = null) { m_VisualTreeUpdater = new VisualTreeUpdater(this); this.ownerObject = ownerObject; this.contextType = contextType; this.dispatcher = dispatcher ?? EventDispatcher.instance; repaintData = new RepaintData(); cursorManager = new CursorManager(); contextualMenuManager = null; m_RootContainer = new VisualElement { name = VisualElementUtils.GetUniqueName("unity-panel-container"), viewDataKey = "PanelContainer" }; // Required! visualTree.SetPanel(this); focusController = new FocusController(new VisualElementFocusRing(visualTree)); m_ProfileUpdateName = "PanelUpdate"; m_ProfileLayoutName = "PanelLayout"; m_ProfileBindingsName = "PanelBindings"; allowPixelCaching = true; InvokeHierarchyChanged(visualTree, HierarchyChangeType.Add); }
internal void Blur() { FocusController expr_07 = this.focusController; if (expr_07 != null) { expr_07.BlurLastFocusedElement(); } }
internal void Focus() { FocusController expr_07 = this.focusController; if (expr_07 != null) { expr_07.SetFocusToLastFocusedElement(); } }
protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); bool flag = evt != null && evt.target == evt.leafTarget; if (flag) { FocusController expr_28 = this.focusController; if (expr_28 != null) { expr_28.SwitchFocusOnEvent(evt); } } }
public EventDebuggerTrace(IPanel panel, EventBase evt, long duration, IEventHandler mouseCapture) { this.< eventBase > k__BackingField = new EventDebuggerEventRecord(evt); IEventHandler arg_2D_1; if (panel == null) { arg_2D_1 = null; } else { FocusController expr_21 = panel.focusController; arg_2D_1 = ((expr_21 != null) ? expr_21.focusedElement : null); } this.< focusedElement > k__BackingField = arg_2D_1; this.< mouseCapture > k__BackingField = mouseCapture; this.duration = duration; }
public Panel(ScriptableObject ownerObject, ContextType contextType, EventDispatcher dispatcher) { this.ownerObject = ownerObject; this.contextType = contextType; this.dispatcher = dispatcher; repaintData = new RepaintData(); cursorManager = new CursorManager(); contextualMenuManager = null; m_VisualTreeUpdater = new VisualTreeUpdater(this); m_RootContainer = new VisualElement { name = VisualElementUtils.GetUniqueName("unity-panel-container"), viewDataKey = "PanelContainer" }; // Required! visualTree.SetPanel(this); focusController = new FocusController(new VisualElementFocusRing(visualTree)); CreateMarkers(); InvokeHierarchyChanged(visualTree, HierarchyChangeType.Add); }
internal override void ApplyTo(FocusController focusController, Focusable f) { f.Focus(); }
internal virtual void ApplyTo(FocusController focusController, Focusable f) { focusController.SwitchFocus(f, this); }
public static T GetPooled(IEventHandler target, Focusable relatedTarget, FocusChangeDirection direction, FocusController focusController, bool bIsFocusDelegated = false) { T pooled = EventBase <T> .GetPooled(); pooled.target = target; pooled.relatedTarget = relatedTarget; pooled.direction = direction; pooled.focusController = focusController; pooled.IsFocusDelegated = bIsFocusDelegated; return(pooled); }
internal override void ApplyTo(FocusController focusController, Focusable f) { f.Focus(); // Call Focus() virtual method when an element is clicked or otherwise focused explicitly. }