1 #ifndef DALI_DEMO_EXPANDING_BUTTONS_CONTROL_H
2 #define DALI_DEMO_EXPANDING_BUTTONS_CONTROL_H
5 * Copyright (c) 2020 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.
20 #include <dali-toolkit/dali-toolkit.h>
26 class ExpandingButtons;
30 * Control which toggles between showing and hiding a set of buttons.
32 class ExpandingButtons : public Dali::Toolkit::Control
34 public: // Construction / destruction
36 * Create an uninitialized handle
41 * Create an ExpandingButton control with the default pressed and released visual.
43 static ExpandingButtons New();
46 * Destructor. This is non-virtual since derived Handle types must not
47 * contain data or virtual methods
54 ExpandingButtons(const ExpandingButtons& expandingButtons);
59 ExpandingButtons& operator=(const ExpandingButtons& expandingButtons);
64 static ExpandingButtons DownCast(BaseHandle handle);
68 * Add a control (button) to the Expanding button bar. Will be displayed in order of addition.
70 void RegisterButton(Control& control);
73 * Expand the registered buttons out from the main button.
78 * Collapse the expanded buttons back behind the main button.
84 * ExpandingButtons signal type
86 typedef Dali::Signal<bool(ExpandingButtons)> ExpandingButtonsSignalType;
89 * This signal is emitted when the button is going to collapse.
91 ExpandingButtonsSignalType& CollapsingSignal();
93 public: // Not for public use
95 * Create a handle from an implementation
97 ExpandingButtons(Internal::ExpandingButtons& implementation);
100 * Allow the creation of an ExpandingButtons handle from an internal CustomActor pointer
102 ExpandingButtons(Dali::Internal::CustomActor* internal);
107 #endif // DALI_DEMO_EXPANDING_BUTTONS_CONTROL_H