import abstract class inkWidget extends IScriptable
{
	public import function GetName() : CName;
	public import function SetName( widgetName : CName );
	public import function GetController() : weak< inkLogicController >;
	public import function GetControllerByType( controllerType : CName ) : weak< inkLogicController >;
	public import function GetControllerByBaseType( controllerType : CName ) : weak< inkLogicController >;
	public import function GetControllers() : array< weak< inkLogicController > >;
	public import function GetControllersByType( controllerType : CName ) : array< weak< inkLogicController > >;
	public import function GetNumControllers() : Int32;
	public import function GetNumControllersOfType( controllerType : CName ) : Int32;
	public import function GetStylePath() : ResRef;
	public import function SetStyle( styleResPath : ResRef );
	public import function GetState() : CName;
	public import function SetState( state : CName );

	public constexpr static function DefaultState() : CName
	{
		return 'Default';
	}

	public import function IsVisible() : Bool;
	public import function SetVisible( visible : Bool );
	public import function IsInteractive() : Bool;
	public import function SetInteractive( value : Bool );
	public import function SetLayout( layout : inkWidgetLayout );
	public import function GetAffectsLayoutWhenHidden() : Bool;
	public import function SetAffectsLayoutWhenHidden( affectsLayoutWhenHidden : Bool );
	public import function GetMargin() : inkMargin;
	public import function SetMargin( margin : inkMargin );

	public function SetMargin( left : Float, top : Float, right : Float, bottom : Float )
	{
		SetMargin( inkMargin( left, top, right, bottom ) );
	}

	public function UpdateMargin( left : Float, top : Float, right : Float, bottom : Float )
	{
		var currentMargin : inkMargin;
		currentMargin = GetMargin();
		currentMargin.left += left;
		currentMargin.top += top;
		currentMargin.right += right;
		currentMargin.bottom += bottom;
		SetMargin( currentMargin );
	}

	public import function GetPadding() : inkMargin;
	public import function SetPadding( padding : inkMargin );

	public function SetPadding( left : Float, top : Float, right : Float, bottom : Float )
	{
		SetPadding( inkMargin( left, top, right, bottom ) );
	}

	public import function GetHAlign() : inkEHorizontalAlign;
	public import function SetHAlign( hAlign : inkEHorizontalAlign );
	public import function GetVAlign() : inkEVerticalAlign;
	public import function SetVAlign( vAlign : inkEVerticalAlign );
	public import function GetAnchor() : inkEAnchor;
	public import function SetAnchor( anchor : inkEAnchor );
	public import function GetAnchorPoint() : Vector2;
	public import function SetAnchorPoint( anchorPoint : Vector2 );

	public function SetAnchorPoint( x : Float, y : Float )
	{
		SetAnchorPoint( Vector2( x, y ) );
	}

	public import function GetSizeRule() : inkESizeRule;
	public import function SetSizeRule( sizeRule : inkESizeRule );
	public import function GetSizeCoefficient() : Float;
	public import function SetSizeCoefficient( sizeCoefficient : Float );
	public import function GetFitToContent() : Bool;
	public import function SetFitToContent( fitToContent : Bool );
	public import function GetSize() : Vector2;
	public import function SetSize( size : Vector2 );

	public function SetSize( width : Float, height : Float )
	{
		SetSize( Vector2( width, height ) );
	}

	public function GetWidth() : Float
	{
		var size : Vector2;
		size = GetSize();
		return size.X;
	}

	public function GetHeight() : Float
	{
		var size : Vector2;
		size = GetSize();
		return size.Y;
	}

	public function SetWidth( width : Float )
	{
		SetSize( width, GetHeight() );
	}

	public function SetHeight( height : Float )
	{
		SetSize( GetWidth(), height );
	}

	public import function GetDesiredSize() : Vector2;

	public function GetDesiredWidth() : Float
	{
		var size : Vector2;
		size = GetDesiredSize();
		return size.X;
	}

	public function GetDesiredHeight() : Float
	{
		var size : Vector2;
		size = GetDesiredSize();
		return size.Y;
	}

	public import function GetTintColor() : HDRColor;
	public import function SetTintColor( color : HDRColor );

	public function SetTintColor( r : Uint8, g : Uint8, b : Uint8, a : Uint8 )
	{
		SetTintColor( Color( r, g, b, a ) );
	}

	public function SetTintColor( color : Color )
	{
		SetTintColor( Color.ToHDRColorDirect( color ) );
	}

	public import function GetOpacity() : Float;
	public import function SetOpacity( opacity : Float );
	public import function GetRenderTransformPivot() : Vector2;
	public import function SetRenderTransformPivot( pivot : Vector2 );

	public function SetRenderTransformPivot( x : Float, y : Float )
	{
		SetRenderTransformPivot( Vector2( x, y ) );
	}

	public import function SetScale( scale : Vector2 );
	public import function GetScale() : Vector2;
	public import function SetShear( shear : Vector2 );
	public import function GetShear() : Vector2;
	public import function SetRotation( angleInDegrees : Float );
	public import function GetRotation() : Float;
	public import function SetTranslation( translationVector : Vector2 );
	public import function GetTranslation() : Vector2;
	public import function ChangeTranslation( translationVector : Vector2 );

	public function SetTranslation( x : Float, y : Float )
	{
		SetTranslation( Vector2( x, y ) );
	}

	public import function PlayAnimation( animationDefinition : inkAnimDef ) : inkAnimProxy;
	public import function PlayAnimationWithOptions( animationDefinition : inkAnimDef, playbackOptions : inkAnimOptions ) : inkAnimProxy;
	public import function StopAllAnimations();
	public import function CallCustomCallback( eventName : CName );
	public import function RegisterToCallback( eventName : CName, object : IScriptable, functionName : CName );
	public import function UnregisterFromCallback( eventName : CName, object : IScriptable, functionName : CName );
	public import function SetEffectEnabled( effectType : inkEffectType, effectName : CName, enabled : Bool );
	public import function GetEffectEnabled( effectType : inkEffectType, effectName : CName ) : Bool;
	public import function DisableAllEffectsByType( effectType : inkEffectType );
	public import function GetEffectParamValue( effectType : inkEffectType, effectName : CName, paramName : CName ) : Float;
	public import function SetEffectParamValue( effectType : inkEffectType, effectName : CName, paramName : CName, paramValue : Float ) : Float;
	public import function HasUserDataObject( userDataTypeName : CName ) : Bool;
	public import function GetUserDataObjectCount( userDataTypeName : CName ) : Uint32;
	public import function GetUserData( userDataTypeName : CName ) : inkUserData;
	public import function GetUserDataArray( userDataTypeName : CName ) : array< inkUserData >;
	public import function GatherUserData( userDataTypeName : CName, userDataCollection : array< inkUserData > );
	public import function BindProperty( propertyName : CName, stylePath : CName ) : Bool;
	public import function UnbindProperty( propertyName : CName ) : Bool;
	public import function Reparent( newParent : weak< inkCompoundWidget >, optional index : Int32 );
}

importonly abstract class inkLeafWidget extends inkWidget
{
}

import abstract class inkCompoundWidget extends inkWidget
{
	public import function GetNumChildren() : Int32;
	public import function AddChild( widgetTypeName : CName ) : weak< inkWidget >;
	public import function AddChildWidget( widget : weak< inkWidget > );
	public import function GetWidgetByPath( path : inkWidgetPath ) : weak< inkWidget >;
	public import function GetWidgetByIndex( index : Int32 ) : weak< inkWidget >;

	public function GetWidget( path : inkWidgetPath ) : weak< inkWidget >
	{
		return GetWidgetByPath( path );
	}

	public function GetWidget( index : Int32 ) : weak< inkWidget >
	{
		return GetWidgetByIndex( index );
	}

	public import function GetWidgetByPathName( widgetNamePath : CName ) : weak< inkWidget >;

	public function GetWidget( path : CName ) : weak< inkWidget >
	{
		return GetWidgetByPathName( path );
	}

	public import function RemoveChild( childWidget : weak< inkWidget > );
	public import function RemoveChildByIndex( index : Int32 );
	public import function RemoveChildByName( widgetName : CName );
	public import function RemoveAllChildren();
	public import function ReorderChild( childWidget : weak< inkWidget >, newIndex : Int32 );
	public import function GetChildOrder() : inkEChildOrder;
	public import function SetChildOrder( newOrder : inkEChildOrder );
	public import function GetChildMargin() : inkMargin;
	public import function SetChildMargin( newMargin : inkMargin );
	public import function GetChildPosition( widget : weak< inkWidget > ) : Vector2;
	public import function GetChildSize( widget : weak< inkWidget > ) : Vector2;
}

