1 #ifndef DALI_DEMO_EXPANDING_BUTTONS_CONTROL_H
2 #define DALI_DEMO_EXPANDING_BUTTONS_CONTROL_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.
20 #include <dali-toolkit/dali-toolkit.h>
27 class ExpandingButtons;
31 * Control which toggles between showing and hiding a set of buttons.
33 class ExpandingButtons : public Dali::Toolkit::Control
37 public: // Construction / destruction
40 * Create an uninitialized handle
45 * Create an ExpandingButton control with the default pressed and released visual.
47 static ExpandingButtons New();
50 * Destructor. This is non-virtual since derived Handle types must not
51 * contain data or virtual methods
58 ExpandingButtons( const ExpandingButtons& expandingButtons );
63 ExpandingButtons& operator=( const ExpandingButtons& expandingButtons );
68 static ExpandingButtons DownCast( BaseHandle handle );
73 * Add a control (button) to the Expanding button bar. Will be displayed in order of addition.
75 void RegisterButton( Control& control );
78 * Expand the registered buttons out from the main button.
83 * Collapse the expanded buttons back behind the main button.
90 * ExpandingButtons signal type
92 typedef Dali::Signal< bool ( ExpandingButtons ) > ExpandingButtonsSignalType;
95 * This signal is emitted when the button is going to collapse.
97 ExpandingButtonsSignalType& CollapsingSignal();
99 public: // Not for public use
102 * Create a handle from an implementation
104 ExpandingButtons( Internal::ExpandingButtons& implementation );
107 * Allow the creation of an ExpandingButtons handle from an internal CustomActor pointer
109 ExpandingButtons( Dali::Internal::CustomActor* internal );
114 #endif // DALI_DEMO_EXPANDING_BUTTONS_CONTROL_H