<commit_before>﻿// Copyright (c) p<NAME> Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Framework.Testing.Input;
using osuTK;
using osuTK.Graphics;

namespace osu.Framework.Testing
{
    /// <summary>
    /// An abstract test case which is tested with manual input management.
    /// </summary>
    public abstract class ManualInputManagerTestScene : TestScene
    {
        protected override Container<Drawable> Content => InputManager;

        /// <summary>
        /// The position which is used to initialize the mouse position before at setup.
        /// </summary>
        protected virtual Vector2 InitialMousePosition => Vector2.Zero;

        /// <summary>
        /// The <see cref="ManualInputManager"/>.
        /// </summary>
        protected ManualInputManager InputManager { get; }

        private readonly BasicButton buttonTest;
        private readonly BasicButton buttonLocal;

        [SetUp]
        public void SetUp() => ResetInput();

        protected ManualInputManagerTestScene()
        {
            base.Content.AddRange(new Drawable[]
            {
                InputManager = new ManualInputManager
                {
                    UseParentInput = true,
                },
                new Container
                {
                    Depth = float.MinValue,
                    AutoSizeAxes = Axes.Both,<commit_msg>Allow testing of `PlatformAction`s in `ManualInputManagerTestScene`s<commit_after>﻿// Copyright (c) p<NAME> <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Framework.Testing.Input;
using osuTK;
using osuTK.Graphics;

namespace osu.Framework.Testing
{
    /// <summary>
    /// An abstract test case which is tested with manual input management.
    /// </summary>
    public abstract class ManualInputManagerTestScene : TestScene
    {
        protected override Container<Drawable> Content { get; } = new Container { RelativeSizeAxes = Axes.Both };

        /// <summary>
        /// The position which is used to initialize the mouse position before at setup.
        /// </summary>
        protected virtual Vector2 InitialMousePosition => Vector2.Zero;

        /// <summary>
        /// The <see cref="ManualInputManager"/>.
        /// </summary>
        protected ManualInputManager InputManager { get; }

        private readonly BasicButton buttonTest;
        private readonly BasicButton buttonLocal;

        [SetUp]
        public void SetUp() => ResetInput();

        protected ManualInputManagerTestScene()
        {
            base.Content.AddRange(new Drawable[]
            {
                InputManager = new ManualInputManager
                {
                    UseParentInput = true,
                    Child = new PlatformActionContainer().WithChild(Content)
                },
                new Container
                {
                    Depth = float.MinValue,
                    AutoSizeAxes = Axes.Both,
{'fraction_non_alphanumeric': 0.08911973756150902, 'fraction_numerical': 0.0010934937124111536, 'mean_word_length': 2.2904676258992804, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6434695', 'n_tokens_mistral': 943, 'n_tokens_neox': 892, 'n_words': 264}