Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI] Add Internal RequestLayout and OnReqeustLayout virtual method #6588

Open
wants to merge 1 commit into
base: DevelNUI
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/Tizen.NUI/src/public/Layouting/LayoutItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ public ILayoutParent GetParent()
/// </summary>
/// <since_tizen> 6 </since_tizen>
public void RequestLayout()
{
RequestLayout(this);
}

/// <summary>
/// Internal method for request that this layout is re-laid out.<br />
/// This will make this layout and all it's parent layouts dirty.<br />
/// <param name="requested">LayoutItem who request the layout.</param>
/// </summary>
internal void RequestLayout(LayoutItem requsted)
{
flags = flags | LayoutFlags.ForceLayout;
if (parent == null)
Expand All @@ -361,10 +371,10 @@ public void RequestLayout()
LayoutGroup layoutGroup = parent as LayoutGroup;
if (layoutGroup != null && !layoutGroup.LayoutRequested)
{
layoutGroup.RequestLayout();
layoutGroup.RequestLayout(this);
}
}

OnRequestLayout(requsted);
}

/// <summary>
Expand Down Expand Up @@ -541,6 +551,13 @@ protected virtual void OnLayout(bool changed, LayoutLength left, LayoutLength to

internal virtual void OnLayoutIndependentChildren(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom) { }

/// <summary>
/// Virtual method called when this Layout is requested layout by LayoutItem.
/// <param name="requested">LayoutItem who request the layout.</param>
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual void OnRequestLayout(LayoutItem requested) {}

/// <summary>
/// Virtual method to allow derived classes to remove any children before it is removed from
/// its parent.
Expand Down
Loading