Updated demos to use DALi clang-format
[platform/core/uifw/dali-demo.git] / examples / contact-cards / contact-card-layout-info.h
1 #ifndef CONTACT_CARD_LAYOUT_INFO_H
2 #define CONTACT_CARD_LAYOUT_INFO_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/math/vector2.h>
23
24 /**
25  * @brief This is the common data that is used by all contact cards.
26  *
27  * In this context, "unfolded" means when all the details, including the name, address and image are shown.
28  * In this scenario, the control takes up most of the screen and a header is also shown.
29  *
30  * When the contact card is "folded", this means when only brief information is shown to the user, i.e. the image and name.
31  * In this scenario, the control is small and there should be several of these contact cards visible on the screen.
32  */
33 struct ContactCardLayoutInfo
34 {
35   Dali::Vector2 unfoldedPosition; ///< The position of the entire contact card when all details (unfolded) are shown
36   Dali::Vector2 unfoldedSize;     ///< The size of the entire contact card when all details (unfolded) are shown
37   Dali::Vector2 foldedSize;       ///< The size of each contact card when only the brief information is shown (folded)
38
39   Dali::Vector2 padding; ///< The default padding to use throughout
40
41   Dali::Vector2 headerSize;             ///< The size of the header area (only shown when unfolded)
42   Dali::Vector2 headerFoldedPosition;   ///< The position of the header area when folded - required for animation purposes only as it's actually clipped
43   Dali::Vector2 headerUnfoldedPosition; ///< The position of the header area when unfolded
44
45   Dali::Vector2 imageSize;             ///< The size of the image
46   Dali::Vector2 imageFoldedPosition;   ///< The position of the image when folded
47   Dali::Vector2 imageUnfoldedPosition; ///< The position of the image when unfolded
48
49   Dali::Vector2 textFoldedPosition;   ///< The position of the text when folded
50   Dali::Vector2 textUnfoldedPosition; ///< The position of the text when unfolded
51 };
52
53 #endif // CONTACT_CARD_LAYOUT_INFO_H