Files
RobustToolbox/Robust.Client/Interfaces/UserInterface/IUserInterfaceManager.cs
T
Pieter-Jan BriersandGitHub 09c36b57cd Shift half of Clyde around to implement better outline rendering. (#830)
* Attempted Clyde cleanup, didn't get far.

* Add negation operator to Vector2i.

* Add RenderOrder to ISpriteComponent.

* Post process shaders.

Adds "post process" shaders to sprite component.
These are executed on the WHOLE sprite component (every layer)
in one draw.

This is necessary to implement functional outlines.
2019-07-06 19:17:33 +02:00

112 lines
3.3 KiB
C#

using Robust.Client.Input;
using Robust.Client.UserInterface;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using System;
using System.Collections.Generic;
using Robust.Client.Graphics.Clyde;
using Robust.Client.Interfaces.Graphics;
using Robust.Client.Utility;
using Robust.Shared.Map;
using Robust.Shared.Maths;
namespace Robust.Client.Interfaces.UserInterface
{
public interface IUserInterfaceManager
{
UITheme ThemeDefaults { get; }
Stylesheet Stylesheet { get; set; }
Control KeyboardFocused { get; }
Control StateRoot { get; }
Control WindowRoot { get; }
Control ModalRoot { get; }
Control CurrentlyHovered { get; }
float UIScale { get; }
/// <summary>
/// The "root" control to which all other controls are parented,
/// potentially indirectly.
/// </summary>
Control RootControl { get; }
IDebugMonitors DebugMonitors { get; }
void Popup(string contents, string title = "Alert!");
Control MouseGetControl(Vector2 coordinates);
/// <summary>
/// Give a control keyboard focus, releasing focus on the currently focused control (if any).
/// </summary>
/// <param name="control">The control to give keyboard focus to.</param>
/// <exception cref="ArgumentNullException">Thrown if <see cref="control"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentException">
/// Thrown if <see cref="control"/> has <see cref="Control.CanKeyboardFocus"/> <c>false</c>.
/// </exception>
void GrabKeyboardFocus(Control control);
/// <summary>
/// Release keyboard focus from the currently focused control, if any.
/// </summary>
void ReleaseKeyboardFocus();
/// <summary>
/// Conditionally release keyboard focus if <see cref="ifControl"/> has keyboard focus.
/// </summary>
/// <exception cref="ArgumentNullException">
/// Thrown if <see cref="ifControl"/> is <c>null</c>.
/// </exception>
/// <seealso cref="ReleaseKeyboardFocus()"/>
void ReleaseKeyboardFocus(Control ifControl);
}
internal interface IUserInterfaceManagerInternal : IUserInterfaceManager
{
/// <summary>
/// Clears and disposes of all UI components.
/// Highly destructive!
/// </summary>
void DisposeAllComponents();
void Initialize();
void InitializeTesting();
void Update(ProcessFrameEventArgs args);
void FrameUpdate(RenderFrameEventArgs args);
void MouseDown(MouseButtonEventArgs args);
void MouseUp(MouseButtonEventArgs args);
void MouseMove(MouseMoveEventArgs mouseMoveEventArgs);
void MouseWheel(MouseWheelEventArgs args);
void TextEntered(TextEventArgs textEvent);
void KeyDown(KeyEventArgs keyEvent);
void KeyUp(KeyEventArgs keyEvent);
void ControlHidden(Control control);
void ControlRemovedFromTree(Control control);
void PushModal(Control modal);
void RemoveModal(Control modal);
void Render(IRenderHandle renderHandle);
Dictionary<(GodotAsset asset, int resourceId), object> GodotResourceInstanceCache { get; }
}
}