[NUI] Add SetUnderline, GetUnderline to Text Components
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / ViewSelectorData.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System;
19 using System.Diagnostics;
20
21 namespace Tizen.NUI.BaseComponents
22 {
23     /// <summary>
24     /// The class storing extra selector properties of view that is rared used.
25     /// </summary>
26     internal class ViewSelectorData
27     {
28         internal ViewSelectorData() { }
29
30         public TriggerableSelector<Color> BackgroundColor{ get; set; }
31         public TriggerableSelector<string> BackgroundImage{ get; set; }
32         public TriggerableSelector<Rectangle> BackgroundImageBorder{ get; set; }
33         public TriggerableSelector<Color> Color{ get; set; }
34         public TriggerableSelector<float?> Opacity{ get; set; }
35         public TriggerableSelector<ImageShadow> ImageShadow{ get; set; }
36         public TriggerableSelector<Shadow> BoxShadow{ get; set; }
37
38         public void ClearBackground(View view)
39         {
40             BackgroundColor?.Reset(view);
41             BackgroundImage?.Reset(view);
42             BackgroundImageBorder?.Reset(view);
43             BackgroundColor = null;
44             BackgroundImage = null;
45             BackgroundImageBorder = null;
46         }
47         public void ClearShadow(View view)
48         {
49             ImageShadow?.Reset(view);
50             BoxShadow?.Reset(view);
51             ImageShadow = null;
52             BoxShadow = null;
53         }
54
55         public void Reset(View view)
56         {
57             BackgroundColor?.Reset(view);
58             BackgroundImage?.Reset(view);
59             BackgroundImageBorder?.Reset(view);
60             Color?.Reset(view);
61             Opacity?.Reset(view);
62             ImageShadow?.Reset(view);
63             BoxShadow?.Reset(view);
64         }
65     }
66 }
67
68