2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
24 /// [Draft] Class that encodes a measurement and a measure state, which is set if the measured size is too small.
26 public struct MeasuredSize
31 /// <param name="measuredSize">size parameter</param>
32 /// <param name="state">State</param>
33 /// <since_tizen> 6 </since_tizen>
34 public MeasuredSize(LayoutLength measuredSize, MeasuredSize.StateType state)
41 /// Creates a MeasuredSize from a LayoutLength
43 /// <param name="measuredSize">LayoutLength to create </param>
44 /// <since_tizen> 6 </since_tizen>
45 /// <returns> Returns a MeasuredSize object</returns>
46 public static implicit operator MeasuredSize(LayoutLength measuredSize)
48 return new MeasuredSize(measuredSize, StateType.MeasuredSizeOK);
52 /// LayoutLength size property
54 /// <since_tizen> 6 </since_tizen>
55 public LayoutLength Size{ get; set;}
58 /// Measured state for this size.
60 /// <since_tizen> 6 </since_tizen>
61 public StateType State{ get; set; }
64 /// Measured states for a Size value.
66 /// <since_tizen> 6 </since_tizen>
70 /// The measured size is good
74 /// The measured size is too small