1 #ifndef DALI_DEMO_SHADOW_BUTTON_H
2 #define DALI_DEMO_SHADOW_BUTTON_H
5 * Copyright (c) 2017 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 // All type registered controls need to have the same name for the body
34 * Button that allows the RGB channels of an image to be altered.
36 class ShadowButton : public Dali::Toolkit::Control
40 * The start and end property ranges for this Control
44 PROPERTY_START_INDEX = Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX + 1,
45 PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000,
46 ANIMATABLE_PROPERTY_START_INDEX = Dali::ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
47 ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX+1000
54 ACTIVE_TRANSITION = PROPERTY_START_INDEX,
67 public: // Construction / destruction
70 * Create an uninitialized handle
75 * Create a new image channel button without an image. Use
76 * SetImage to give this button an image
78 static ShadowButton New();
81 * Create a new image channel button from a given URL
83 static ShadowButton New( const std::string& url );
86 * Destructor. This is non-virtual since derived Handle types must not
87 * contain data or virtual methods
94 ShadowButton( const ShadowButton& shadowButton );
99 ShadowButton& operator=( const ShadowButton& shadowButton );
104 static ShadowButton DownCast( BaseHandle handle );
109 * @brief Set the button to be active or inactive.
111 * The button will perform a transition if there is a state change.
112 * @param[in] active The active state
114 void SetActiveState( bool active );
117 * @brief Get the button's active state
119 * @return The active state
121 bool GetActiveState();
124 * Set the check state
125 * @param[in] checkState The state of the checkbox
127 void SetCheckState( bool checkState );
130 * Get the check state
131 * @return the check state
133 bool GetCheckState();
135 public: // Not for public use
137 * Create a handle from an implementation
139 ShadowButton( Internal::ShadowButton& implementation );
142 * Allow the creation of an ShadowButton handle from an internal CustomActor pointer
144 ShadowButton( Dali::Internal::CustomActor* internal );
149 #endif // DALI_DEMO_SHADOW_BUTTON_H