1 /* Copyright (c) 2021 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 namespace Tizen.NUI.Components
19 internal class UngroupedItemSource : IGroupableItemSource
21 readonly IItemSource source;
23 public UngroupedItemSource(IItemSource itemSource)
28 public int Count => source.Count;
30 public bool HasHeader { get => source.HasHeader; set => source.HasHeader = value; }
31 public bool HasFooter { get => source.HasFooter; set => source.HasFooter = value; }
38 public object GetItem(int position)
40 return source.GetItem(position);
43 public int GetPosition(object item)
45 return source.GetPosition(item);
48 public bool IsFooter(int position)
50 return source.IsFooter(position);
53 public bool IsGroupFooter(int position)
58 public bool IsGroupHeader(int position)
63 public bool IsHeader(int position)
65 return source.IsHeader(position);
68 public object GetGroupParent(int position)