Files
sbox-public/engine/Sandbox.Tools/Qt/Frame.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

43 lines
697 B
C#

using System;
namespace Editor
{
/// <summary>
/// Like a widget - but is drawn
/// </summary>
public class Frame : Widget
{
internal Native.QFrame _frame;
internal Frame() : base( false )
{
}
internal Frame( IntPtr widget ) : base( false )
{
NativeInit( widget );
}
public Frame( Widget parent ) : base( false )
{
Sandbox.InteropSystem.Alloc( this );
var widget = CFrame.CreateFrame( parent?._widget ?? default, this );
NativeInit( widget );
}
internal override void NativeInit( IntPtr ptr )
{
_frame = ptr;
base.NativeInit( ptr );
}
internal override void NativeShutdown()
{
_frame = default;
base.NativeShutdown();
}
}
}