/// </summary>
internal class LayoutController : Disposable
{
- static bool LayoutDebugController = false; // Debug flag
-
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void Callback(int id);
{
if (rootNode.Layout != null)
{
- Debug.WriteLineIf(LayoutDebugController, "LayoutController Root found:" + rootNode.Name);
+ NUILog.Debug("LayoutController Root found:" + rootNode.Name);
// rootNode has a layout, start measuring and layouting from here.
MeasureAndLayout(rootNode);
}
/// </summary>
private void PlayAnimation()
{
- Debug.WriteLineIf(LayoutDebugController, "LayoutController Playing, Core Duration:" + coreAnimation.Duration);
+ NUILog.Debug("LayoutController Playing, Core Duration:" + coreAnimation.Duration);
coreAnimation.Play();
}
// of the other stack. Then the main removal stack iterated when AnimationFinished
// occurs again.
}
- Debug.WriteLineIf(LayoutDebugController, "LayoutController AnimationFinished");
+ NUILog.Debug("LayoutController AnimationFinished");
coreAnimation?.Clear();
}
// Initialize animation for this layout run.
bool animationPending = false;
- Debug.WriteLineIf(LayoutDebugController,
- "LayoutController SetupCoreAnimation for:" + layoutTransitionDataQueue.Count);
+ NUILog.Debug("LayoutController SetupCoreAnimation for:" + layoutTransitionDataQueue.Count);
if (layoutTransitionDataQueue.Count > 0) // Something to animate
{
positionTransitionComponents.Duration,
positionTransitionComponents.AlphaFunction);
- Debug.WriteLineIf(LayoutDebugController,
- "LayoutController SetupAnimationForPosition View:" + layoutPositionData.Item.Owner.Name +
+ NUILog.Debug("LayoutController SetupAnimationForPosition View:" + layoutPositionData.Item.Owner.Name +
" left:" + layoutPositionData.Left +
" top:" + layoutPositionData.Top +
" delay:" + positionTransitionComponents.Delay +
sizeTransitionComponents.Duration,
sizeTransitionComponents.AlphaFunction);
- Debug.WriteLineIf(LayoutDebugController,
- "LayoutController SetupAnimationForSize View:" + layoutPositionData.Item.Owner.Name +
+ NUILog.Debug("LayoutController SetupAnimationForSize View:" + layoutPositionData.Item.Owner.Name +
" width:" + (layoutPositionData.Right - layoutPositionData.Left) +
" height:" + (layoutPositionData.Bottom - layoutPositionData.Top) +
" delay:" + sizeTransitionComponents.Delay +
transition.Animator.Duration,
transition.Animator.AlphaFunction);
- Debug.WriteLineIf(LayoutDebugController,
- "LayoutController SetupAnimationForCustomTransitions View:" + view.Name +
+ NUILog.Debug("LayoutController SetupAnimationForCustomTransitions View:" + view.Name +
" Property:" + transition.AnimatableProperty.ToString() +
" delay:" + transition.Animator.Delay +
" duration:" + transition.Animator.Duration);
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty FlexGrowProperty = BindableProperty.CreateAttached("FlexGrow", typeof(float), typeof(FlexLayout), FlexUndefined, validateValue: (bindable, value) => (float)value >= 0, propertyChanged: OnChildPropertyChanged);
- private static bool LayoutDebugFlex = false; // Debug flag
-
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private bool swigCMemOwn;
private bool disposed;
LayoutLength flexLayoutWidth = new LayoutLength(Interop.FlexLayout.GetWidth(swigCPtr));
LayoutLength flexLayoutHeight = new LayoutLength(Interop.FlexLayout.GetHeight(swigCPtr));
- Debug.WriteLineIf(LayoutDebugFlex, "FlexLayout OnMeasure width:" + flexLayoutWidth.AsRoundedValue()
- + " height:" + flexLayoutHeight.AsRoundedValue());
+ NUILog.Debug("FlexLayout OnMeasure width:" + flexLayoutWidth.AsRoundedValue() + " height:" + flexLayoutHeight.AsRoundedValue());
SetMeasuredDimensions(GetDefaultSize(flexLayoutWidth, widthMeasureSpec),
GetDefaultSize(flexLayoutHeight, heightMeasureSpec));
/// </summary>
public class LayoutItem : IDisposable
{
- static bool LayoutDebugFrameData = false; // Debug flag
-
private bool disposed = false;
private MeasureSpecification oldWidthMeasureSpec; // Store measure specification to compare against later
private MeasureSpecification oldHeightMeasureSpec; // Store measure specification to compare against later
// Store new layout position data
layoutPositionData = new LayoutData(this, ConditionForAnimation, left, top, right, bottom);
- Debug.WriteLineIf(LayoutDebugFrameData, "LayoutItem FramePositionData View:" + layoutPositionData.Item.Owner.Name +
+ NUILog.Debug("LayoutItem FramePositionData View:" + layoutPositionData.Item.Owner.Name +
" left:" + layoutPositionData.Left +
" top:" + layoutPositionData.Top +
" right:" + layoutPositionData.Right +