This is ACR patch to make TabView APIs public.
This pull request includes properties and methods of TabView, TabBar,
TabButton, TabButtonstyle and TabContent classes.
{
/// <summary>
/// Creates a new instance of TabButtonSelectedEventArgs.
+ /// The indices of tab buttons in TabBar are basically the order of adding to TabBar by <see cref="TabView.AddTab"/>.
+ /// So a tab button's index in TabBar can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
- /// <param name="index">The selected index.</param>
+ /// <param name="index">The index of the selected tab button in TabBar.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public TabButtonSelectedEventArgs(int index)
{
/// <summary>
/// TabBar is a class which contains a set of TabButtons and has one of them selected.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class TabBar : Control
{
private IList<TabButton> tabButtons;
/// <summary>
/// Creates a new instance of TabBar.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabBar()
{
Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Horizontal };
/// <summary>
/// The index of the selected tab button.
+ /// The indices of tab buttons in TabBar are basically the order of adding to TabBar by <see cref="TabView.AddTab"/>.
+ /// So a tab button's index in TabBar can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
protected int SelectedIndex { get; set; }
/// <summary>
/// Gets the count of tab buttons.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public int TabButtonCount => tabButtons.Count;
/// <summary>
}
/// <inheritdoc/>
+ [EditorBrowsable(EditorBrowsableState.Never)]
public override void OnRelayout(Vector2 size, RelayoutContainer container)
{
base.OnRelayout(size, container);
/// <summary>
/// Gets the tab button at the specified index of TabBar.
+ /// The indices of tab buttons in TabBar are basically the order of adding to TabBar by <see cref="TabView.AddTab"/>.
+ /// So a tab button's index in TabBar can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
- /// <param name="index">The index of TabBar where the specified tab button exists.</param>
+ /// <param name="index">The index of tab button in TabBar where the specified tab button exists.</param>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the index is less than 0, or greater than or equal to the number of tab buttons.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabButton GetTabButton(int index)
{
if ((index < 0) || (index >= tabButtons.Count))
return tabButtons[index];
}
- /// <summary>
- /// Dispose TabBar and all children on it.
- /// </summary>
- /// <param name="type">Dispose type.</param>
+ /// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
/// <summary>
/// TabButton is a class which is used for selecting one content in a TabView.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class TabButton : SelectButton
{
private bool selectedAgain = false;
/// <summary>
/// Creates a new instance of TabButton.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabButton()
{
Initialize();
Initialize();
}
- /// <summary>
- /// Applies style to TabButton.
- /// </summary>
- /// <param name="viewStyle">The style to apply.</param>
+ /// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
public override void ApplyStyle(ViewStyle viewStyle)
{
return ret;
}
- /// <summary>
- /// Dispose TabButton and all children on it.
- /// </summary>
- /// <param name="type">Dispose type.</param>
+ /// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
/// <summary>
/// TabContent is a class which contains a set of Views and has one of them selected.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class TabContent : Control
{
private IList<View> views;
/// <summary>
/// Creates a new instance of TabContent.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabContent()
{
SelectedIndex = -1;
/// <summary>
/// The index of the selected view.
+ /// The indices of views in TabContent are basically the order of adding to TabContent by <see cref="TabView.AddTab"/>.
+ /// So a view's index in TabContent can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
protected int SelectedIndex { get; set; }
/// <summary>
/// Gets the count of views.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public int ViewCount => views.Count;
/// <summary>
/// <summary>
/// Selects a view at the specified index of TabContent.
+ /// The indices of views in TabContent are basically the order of adding to TabContent by <see cref="TabView.AddTab"/>.
+ /// So a view's index in TabContent can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
- /// <param name="index">The index of TabContent where a view will be selected.</param>
+ /// <param name="index">The index of a view in TabContent where the view will be selected.</param>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the index is less than -1, or greater than or equal to the number of views.</exception>
[EditorBrowsable(EditorBrowsableState.Never)]
protected internal void Select(int index)
/// <summary>
/// Gets the view at the specified index of TabContent.
+ /// The indices of views in TabContent are basically the order of adding to TabContent by <see cref="TabView.AddTab"/>.
+ /// So a view's index in TabContent can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
- /// <param name="index">The index of TabContent where the specified view exists.</param>
+ /// <param name="index">The index of a view in TabContent where the specified view exists.</param>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the index is less than 0, or greater than or equal to the number of views.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public View GetView(int index)
{
if ((index < 0) || (index >= views.Count))
return views[index];
}
- /// <summary>
- /// Dispose TabContent and all children on it.
- /// </summary>
- /// <param name="type">Dispose type.</param>
+ /// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
namespace Tizen.NUI.Components
{
/// <summary>
- /// TabView is a class which contains a TabBar and TabContent and
- /// selects a view from the TabContent according to the selected TabButton in the TabBar.
+ /// TabView is a class which contains a TabBar and TabContent.
+ /// TabView adds TabButtons and Views to TabBar and TabContent in TabView by <see cref="TabView.AddTab"/>.
+ /// TabView removes TabButtons and Views from TabBar and TabContent in TabView by <see cref="TabView.RemoveTab"/>.
+ /// TabView selects a view from the TabContent according to the selected TabButton in the TabBar.
+ ///
+ /// <example>
+ /// <code>
+ /// var tabView = new TabView()
+ /// {
+ /// WidthSpecification = LayoutParamPolicies.MatchParent,
+ /// HeightSpecification = LayoutParamPolicies.MatchParent,
+ /// };
+ ///
+ /// var tabButton = new TabButton()
+ /// {
+ /// Text = "Tab#1"
+ /// };
+ ///
+ /// var content = new View()
+ /// {
+ /// BackgroundColor = Color.Red,
+ /// WidthSpecification = LayoutParamPolicies.MatchParent,
+ /// HeightSpecification = LayoutParamPolicies.MatchParent,
+ /// };
+ ///
+ /// tabView.AddTab(tabButton, content);
+ ///
+ /// var tabButton2 = new TabButton()
+ /// {
+ /// Text = "Tab#2"
+ /// };
+ ///
+ /// var content2 = new View()
+ /// {
+ /// BackgroundColor = Color.Green,
+ /// WidthSpecification = LayoutParamPolicies.MatchParent,
+ /// HeightSpecification = LayoutParamPolicies.MatchParent,
+ /// };
+ ///
+ /// tabView.AddTab(tabButton2, content2);
+ ///
+ /// var tabButton3 = new TabButton()
+ /// {
+ /// Text = "Tab#3"
+ /// };
+ ///
+ /// var content3 = new View()
+ /// {
+ /// BackgroundColor = Color.Blue,
+ /// WidthSpecification = LayoutParamPolicies.MatchParent,
+ /// HeightSpecification = LayoutParamPolicies.MatchParent,
+ /// };
+ ///
+ /// tabView.AddTab(tabButton3, content3);
+ /// </code>
+ /// </example>
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class TabView : Control
{
private TabBar tabBar = null;
/// <summary>
/// Creates a new instance of TabView.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabView()
{
Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical };
/// <summary>
/// Gets TabBar of TabView.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabBar TabBar
{
get
/// <summary>
/// Gets TabContent of TabView.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TabContent Content
{
get
/// </summary>
/// <param name="tabButton">A tab button to be added.</param>
/// <param name="view">A content view to be added.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public void AddTab(TabButton tabButton, View view)
{
if (TabBar != null)
/// <summary>
/// Removes a tab at the specified index of TabView.
+ /// The indices of tabs(tab buttons and views) in TabView are basically the order of adding to TabView by <see cref="TabView.AddTab"/>.
+ /// So the index of a tab(tab button and view) in TabView can be changed whenever <see cref="TabView.AddTab"/> or <see cref="TabView.RemoveTab"/> is called.
/// </summary>
- /// <param name="index">The index of TabView where a tab will be removed.</param>
+ /// <param name="index">The index of a tab(tab button and view) in TabView where the tab will be removed.</param>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the index is less than 0, or greater than or equal to the number of tabs.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public void RemoveTab(int index)
{
var tabButton = TabBar.GetTabButton(index);
}
}
- /// <summary>
- /// Dispose TabView and all children on it.
- /// </summary>
- /// <param name="type">Dispose type.</param>
+ /// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
tabView = new TabView()
{
- WidthResizePolicy = ResizePolicyType.FillToParent,
- HeightResizePolicy = ResizePolicyType.FillToParent
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
};
tabCount = 0;
WidthSpecification = LayoutParamPolicies.MatchParent,
HeightSpecification = LayoutParamPolicies.MatchParent,
HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Center
+ VerticalAlignment = VerticalAlignment.Center,
};
tabView.AddTab(tabButton, content);