2 * Copyright(c) 2021 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.
21 using System.ComponentModel;
22 using Tizen.NUI.BaseComponents;
25 /// TransitionBase class is a base class for each Transitions.
26 /// Each Transition child classes inherits this base class.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class TransitionBase : Disposable
31 private static readonly float DefaultDuration = 0.5f;
32 protected internal AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
33 protected internal TimePeriod timePeriod = new TimePeriod(DefaultDuration);
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 public TransitionBase()
40 [EditorBrowsable(EditorBrowsableState.Never)]
41 public AlphaFunction AlphaFunction
45 alphaFunction = value;
53 [EditorBrowsable(EditorBrowsableState.Never)]
54 public TimePeriod TimePeriod
66 internal TransitionItemBase CreateTransition(View target, bool isEntering)
68 return new TransitionItemBase(target, isEntering, timePeriod, alphaFunction);
71 protected override void Dispose(DisposeTypes type)
73 alphaFunction.Dispose();