1 #ifndef DALI_DEMO_FLEX_EXAMPLE_H
2 #define DALI_DEMO_FLEX_EXAMPLE_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <dali/dali.h>
22 #include <dali-toolkit/dali-toolkit.h>
27 using namespace Dali::Toolkit;
33 * @file flex-example.hcpp
34 * @brief Example of a Flex Layout with mirror feature and
35 * transition from horizontal to vertical.
37 class FlexExample final: public ConnectionTracker, public Example
42 // Creates a Flex Layout Example and displays it.
43 virtual void Create() override;
45 // Remove and destroy this layout
46 virtual void Remove() override;
50 // Changes the direction of the items.
51 bool OnDirectionClicked( Button button );
53 // Alternates the layout from horizontal to vertical
54 bool OnRotateClicked( Button button );
56 // Alternates the layout wrapping from wrapping to none
57 bool OnWrapClicked( Button button );
59 // Alternates the layout to justify space between items or not
60 bool OnJustifyClicked( Button button );
63 PushButton mDirectionButton;
64 PushButton mRotateButton;
65 PushButton mWrapButton;
66 PushButton mJustifyButton;
67 Control mFlexContainer;
69 }; // class FlexExample
73 #endif //DALI_DEMO_FLEX_EXAMPLE_H