Adding button-devel.h and deprecation updates 52/101952/8
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Fri, 2 Dec 2016 11:51:43 +0000 (11:51 +0000)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Tue, 13 Dec 2016 13:22:23 +0000 (13:22 +0000)
Removing new visuals from public api
Adding Label and Visual padding to Button devel api

Change-Id: Ib6d790f8821cc74306baa237c78a0fa4b6e4a77c

automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
build/tizen/dali-toolkit/Makefile.am
dali-toolkit/devel-api/controls/buttons/button-devel.h [new file with mode: 0644]
dali-toolkit/devel-api/file.list
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/button-impl.h
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json

index f60ab87..c67b2ae 100644 (file)
@@ -20,6 +20,7 @@
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
@@ -37,6 +38,10 @@ bool CheckBoxButtonClicked( Button button )
   return true;
 }
 
+static const char* TEST_IMAGE_ONE = TEST_RESOURCE_DIR "/gallery-small-1.jpg";
+const Vector2 TEST_IMAGE_SIZE = Vector2( 66.0f, 66.0f );
+
+
 } // namespace
 
 void checkbox_button_startup(void)
@@ -213,3 +218,100 @@ int UtcDaliCheckBoxSettingDisabled(void)
 
   END_TEST;
 }
+
+int UtcDaliCheckBoxSetLabelPadding(void)
+{
+  tet_infoline("UtcDaliCheckBoxSetLabelPadding\n");
+
+  ToolkitTestApplication application;
+
+  CheckBoxButton checkBox = CheckBoxButton::New();
+
+  Property::Map propertyMap;
+
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+             .Add( Toolkit::TextVisual::Property::TEXT, "activate" )
+             .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
+
+  checkBox.SetProperty( Toolkit::DevelButton::Property::LABEL, propertyMap );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector3 orginalSize = checkBox.GetNaturalSize();
+
+  checkBox.SetProperty( Toolkit::DevelButton::Property::LABEL_PADDING, Vector4( 10.0f, 10.0f, 10.0f, 10.0f ) );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector3 paddingAddedSize = checkBox.GetNaturalSize();
+
+  DALI_TEST_EQUALS( checkBox.GetProperty<Vector4>( Toolkit::DevelButton::Property::LABEL_PADDING ), Vector4( 10.0f, 10.0f, 10.0f, 10.0f ), Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+  tet_infoline("Comparing original size of button with just text and button size with text and padding\n");
+
+  DALI_TEST_EQUALS( orginalSize.width +10.0f + 10.0f , paddingAddedSize.width, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( orginalSize.height +10.0f + 10.0f , paddingAddedSize.height, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliCheckBoxSetForegroundPadding(void)
+{
+  tet_infoline("UtcDaliCheckBoxSetForegroundPadding\n");
+
+  ToolkitTestApplication application;
+
+  CheckBoxButton checkBox = CheckBoxButton::New();
+
+  Property::Map propertyMap;
+
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+             .Add( Toolkit::TextVisual::Property::TEXT, "activate" )
+             .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
+
+  checkBox.SetProperty( Toolkit::DevelButton::Property::LABEL, propertyMap );
+  checkBox.SetProperty( Toolkit::DevelButton::Property::LABEL_PADDING, Vector4( 5.0f, 5.0f, 5.0f, 5.0f ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_printf( "Button RelayoutSize with text(%f,%f)\n", checkBox.GetNaturalSize().width, checkBox.GetNaturalSize().height );
+
+  TestPlatformAbstraction& platform = application.GetPlatform();
+  platform.SetClosestImageSize( TEST_IMAGE_SIZE );
+
+  checkBox.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, TEST_IMAGE_ONE );
+  checkBox.SetProperty( Toolkit::DevelButton::Property::SELECTED_VISUAL, TEST_IMAGE_ONE );
+
+
+  application.SendNotification();
+  application.Render();
+
+  Vector3 preVisualPaddingSize = checkBox.GetNaturalSize();
+
+  tet_printf( "Button RelayoutSize with text and icon (%f,%f)\n", checkBox.GetNaturalSize().width, checkBox.GetNaturalSize().height );
+
+  checkBox.SetProperty( Toolkit::DevelButton::Property::VISUAL_PADDING, Vector4( 25.0f, 25.0f, 25.0f, 25.0f ) );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector3 paddingAddedSize = checkBox.GetNaturalSize();
+
+  tet_printf( "Button RelayoutSize with text, icon and padding (%f,%f)\n", checkBox.GetNaturalSize().width, checkBox.GetNaturalSize().height );
+
+  DALI_TEST_EQUALS( checkBox.GetProperty<Vector4>( Toolkit::DevelButton::Property::VISUAL_PADDING ), Vector4( 25.0f, 25.0f, 25.0f, 25.0f ), Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+  tet_infoline("Comparing original size of button before adding padding to visual foreground\n");
+
+  DALI_TEST_GREATER( paddingAddedSize.width, preVisualPaddingSize.width , TEST_LOCATION );
+
+  tet_infoline("Text and Visual are side by side, visual height and padding must be greater than text height and padding for this test\n");
+
+  DALI_TEST_GREATER( paddingAddedSize.height, preVisualPaddingSize.height , TEST_LOCATION );
+
+  END_TEST;
+}
index 38f4c89..4ba3e04 100644 (file)
@@ -101,6 +101,7 @@ develapibuilderdir =            $(develapidir)/builder
 develapicontrolsdir =           $(develapidir)/controls
 develapibloomviewdir =          $(develapicontrolsdir)/bloom-view
 develapibubbleemitterdir =      $(develapicontrolsdir)/bubble-effect
+develapibuttonsdir =            $(develapicontrolsdir)/buttons
 develapieffectsviewdir =        $(develapicontrolsdir)/effects-view
 develapigaussianblurviewdir =   $(develapicontrolsdir)/gaussian-blur-view
 develapimagnifierdir =          $(develapicontrolsdir)/magnifier
@@ -125,6 +126,7 @@ develapi_HEADERS =                  $(devel_api_header_files)
 develapicontrols_HEADERS =          $(devel_api_controls_header_files)
 develapibloomview_HEADERS =         $(devel_api_bloom_view_header_files)
 develapibubbleemitter_HEADERS =     $(devel_api_bubble_emitter_header_files)
+develapibuttons_HEADERS =           $(devel_api_buttons_header_files)
 develapibuilder_HEADERS =           $(devel_api_builder_header_files)
 develapieffectsview_HEADERS =       $(devel_api_effects_view_header_files)
 develapifocusmanager_HEADERS =      $(devel_api_focus_manager_header_files)
diff --git a/dali-toolkit/devel-api/controls/buttons/button-devel.h b/dali-toolkit/devel-api/controls/buttons/button-devel.h
new file mode 100644 (file)
index 0000000..769c8eb
--- /dev/null
@@ -0,0 +1,151 @@
+#ifndef __DALI_TOOLKIT_BUTTON_DEVEL_H__
+#define __DALI_TOOLKIT_BUTTON_DEVEL_H__
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/buttons/button.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelButton
+{
+/**
+ *
+ * @section ButtonProperties Properties
+ * |%Property enum                                         |String name                             |Type          |Writable|Animatable|
+ * |-------------------------------------------------------|----------------------------------------|--------------|--------|----------|
+ * | Property::DISABLED                                    | disabled                               |  BOOLEAN     | Y      | N        |
+ * | Property::AUTO_REPEATING                              | autoRepeating                          |  BOOLEAN     | Y      | N        |
+ * | Property::INITIAL_AUTO_REPEATING_DELAY                | initialAutoRepeatingDelay              |  FLOAT       | Y      | N        |
+ * | Property::NEXT_AUTO_REPEATING_DELAY                   | nextAutoRepeatingDelay                 |  FLOAT       | Y      | N        |
+ * | Property::TOGGLABLE                                   | togglable                              |  BOOLEAN     | Y      | N        |
+ * | Property::SELECTED                                    | selected                               |  BOOLEAN     | Y      | N        |
+ * | Property::LABEL                                       | label                                  |  MAP         | Y      | N        |
+ * | Property::UNSELECTED_STATE_VISUAL                     | unselectedVisual                       |  MAP         | Y      | N        |
+ * | Property::SELECTED_VISUAL                             | selectedVisual                         |  MAP         | Y      | N        |
+ * | Property::DISABLED_SELECTED_VISUAL                    | disabledSelectedVisual                 |  MAP         | Y      | N        |
+ * | Property::DISABLED_UNSELECTED_VISUAL                  | disabledUnselectedVisual               |  MAP         | Y      | N        |
+ * | Property::UNSELECTED_BACKGROUND_VISUAL                | unselectedBackgroundVisual             |  MAP         | Y      | N        |
+ * | Property::SELECTED_BACKGROUND_VISUAL                  | selectedBackgroundVisual               |  MAP         | Y      | N        |
+ * | Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL       | disabledUnselectedBackgroundVisual     |  MAP         | Y      | N        |
+ * | Property::DISABLED_SELECTED_BACKGROUND_VISUAL         | disabledSelectedBackgroundVisual       |  MAP         | Y      | N        |
+ * | Property::LABEL_RELATIVE_ALIGNMENT                    | labelRelativeAlignment                 |  STRING      | Y      | N        |
+ * -------------------------------------------------------------------------------------------------------------------------------------
+ *
+ *
+ */
+
+  namespace Property
+  {
+    enum Type
+    {
+      DISABLED = Dali::Toolkit::Button::Property::DISABLED,
+      AUTO_REPEATING = Dali::Toolkit::Button::Property::AUTO_REPEATING,
+      INITIAL_AUTO_REPEATING_DELAY = Dali::Toolkit::Button::Property::INITIAL_AUTO_REPEATING_DELAY,
+      NEXT_AUTO_REPEATING_DELAY = Dali::Toolkit::Button::Property:: NEXT_AUTO_REPEATING_DELAY,
+      TOGGLABLE = Dali::Toolkit::Button::Property::TOGGLABLE,
+      SELECTED = Dali::Toolkit::Button::Property::SELECTED,
+      UNSELECTED_STATE_IMAGE = Dali::Toolkit::Button::Property::UNSELECTED_STATE_IMAGE,
+      SELECTED_STATE_IMAGE = Dali::Toolkit::Button::Property::SELECTED_STATE_IMAGE,
+      DISABLED_STATE_IMAGE = Dali::Toolkit::Button::Property::DISABLED_STATE_IMAGE,
+      UNSELECTED_COLOR = Dali::Toolkit::Button::Property::UNSELECTED_COLOR,
+      SELECTED_COLOR = Dali::Toolkit::Button::Property::SELECTED_COLOR,
+      LABEL = Dali::Toolkit::Button::Property::LABEL,
+      LABEL_TEXT = Dali::Toolkit::Button::Property::LABEL_TEXT,
+
+      /**
+       * @brief name "unselectedVisual", type string if it is a url, map otherwise
+       * @details Sets the unselected button foreground/icon visual
+       */
+      UNSELECTED_VISUAL = LABEL_TEXT + 1,
+
+      /**
+       * @brief name "selectedImage", type string if it is a url, map otherwise
+       * @details Sets the selected button foreground/icon visual
+       * @SINCE_1_2.18
+       */
+      SELECTED_VISUAL,
+
+      /**
+       * @brief name "disabledSelectedVisual", type string if it is a url, map otherwise
+       * @details Sets the disabled selected state foreground/icon button visual
+       */
+      DISABLED_SELECTED_VISUAL,
+
+      /**
+       * @brief name "disabledUnSelectedVisual", type string if it is a url, map otherwise
+       * @details Sets the disabled unselected state foreground/icon visual
+       */
+      DISABLED_UNSELECTED_VISUAL,
+
+      /**
+       * @brief name "unselectedBackgroundVisual", type string if it is a url, map otherwise
+       * @details Sets the disabled in the unselected state background, button visual
+       */
+      UNSELECTED_BACKGROUND_VISUAL,
+
+      /**
+       * @brief name "selectedBackgroundVisual", type string if it is a url, map otherwise
+       * @details Sets the selected background button visual
+       */
+      SELECTED_BACKGROUND_VISUAL,
+
+      /**
+       * @brief name "disabledUnselectedBackgroundVisual", type string if it is a url, map otherwise
+       * @details Sets the disabled while unselected background button visual
+       */
+      DISABLED_UNSELECTED_BACKGROUND_VISUAL,
+
+      /**
+       * @brief name "disabledSelectedBackgroundVisual", type string if it is a url, map otherwise
+       * @details Sets the disabled while selected background button visual
+       */
+      DISABLED_SELECTED_BACKGROUND_VISUAL,
+
+      /**
+       * @brief name "labelRelativeAlignment", type STRING
+       * @details Sets the position of the the label in relation to the foreground/icon if both present
+       */
+      LABEL_RELATIVE_ALIGNMENT,
+
+      /**
+       * @brief name "labelPadding", type Vector4
+       * @details Sets the padding around the text
+       */
+      LABEL_PADDING,
+
+      /**
+       * @brief name "visualPadding", type Vector4
+       * @details Sets the padding around the foreground visual
+       */
+      VISUAL_PADDING
+    };
+  } // namespace Property
+
+} // namespace DevelButton
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_BUTTON_DEVEL_H__
index 6afe30c..566949b 100644 (file)
@@ -51,6 +51,9 @@ devel_api_bloom_view_header_files = \
 devel_api_bubble_emitter_header_files = \
   $(devel_api_src_dir)/controls/bubble-effect/bubble-emitter.h
 
+devel_api_buttons_header_files = \
+  $(devel_api_src_dir)/controls/buttons/button-devel.h
+
 devel_api_builder_header_files = \
   $(devel_api_src_dir)/builder/builder.h \
   $(devel_api_src_dir)/builder/json-parser.h \
index a984156..661e3b2 100644 (file)
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/size-negotiation/relayout-container.h>
+#include <dali/devel-api/object/property-helper-devel.h>
 #include <dali/devel-api/scripting/scripting.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/public-api/visuals/color-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 #include <dali-toolkit/devel-api/align-enums.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
 #include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
@@ -79,15 +80,17 @@ DALI_PROPERTY_REGISTRATION( Toolkit, Button, "unselectedColor",
 DALI_PROPERTY_REGISTRATION( Toolkit, Button, "selectedColor",                      VECTOR4, SELECTED_COLOR                        ) // Deprecated property
 DALI_PROPERTY_REGISTRATION( Toolkit, Button, "label",                              MAP,     LABEL                                 )
 DALI_PROPERTY_REGISTRATION( Toolkit, Button, "labelText",                          STRING,  LABEL_TEXT                            ) // Deprecated property
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "unselectedVisual",                   MAP,     UNSELECTED_VISUAL                     )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "selectedVisual",                     MAP,     SELECTED_VISUAL                       )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "disabledSelectedVisual",             MAP,     DISABLED_SELECTED_VISUAL              )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "disabledUnselectedVisual",           MAP,     DISABLED_UNSELECTED_VISUAL            )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "unselectedBackgroundVisual",         MAP,     UNSELECTED_BACKGROUND_VISUAL          )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "selectedBackgroundVisual",           MAP,     SELECTED_BACKGROUND_VISUAL            )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "disabledUnselectedBackgroundVisual", MAP,     DISABLED_UNSELECTED_BACKGROUND_VISUAL )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "disabledSelectedBackgroundVisual",   MAP,     DISABLED_SELECTED_BACKGROUND_VISUAL   )
-DALI_PROPERTY_REGISTRATION( Toolkit, Button, "labelRelativeAlignment",             STRING,  LABEL_RELATIVE_ALIGNMENT              )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "unselectedVisual",                   MAP,     UNSELECTED_VISUAL                     )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "selectedVisual",                     MAP,     SELECTED_VISUAL                       )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "disabledSelectedVisual",             MAP,     DISABLED_SELECTED_VISUAL              )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "disabledUnselectedVisual",           MAP,     DISABLED_UNSELECTED_VISUAL            )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "unselectedBackgroundVisual",         MAP,     UNSELECTED_BACKGROUND_VISUAL          )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "selectedBackgroundVisual",           MAP,     SELECTED_BACKGROUND_VISUAL            )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "disabledUnselectedBackgroundVisual", MAP,     DISABLED_UNSELECTED_BACKGROUND_VISUAL )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "disabledSelectedBackgroundVisual",   MAP,     DISABLED_SELECTED_BACKGROUND_VISUAL   )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "labelRelativeAlignment",             STRING,  LABEL_RELATIVE_ALIGNMENT              )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "labelPadding",                       VECTOR4, LABEL_PADDING                         )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, Button, "visualPadding",                      VECTOR4, VISUAL_PADDING                        )
 
 // Signals:
 DALI_SIGNAL_REGISTRATION(   Toolkit, Button, "pressed",                               SIGNAL_PRESSED               )
@@ -119,10 +122,10 @@ const unsigned int ALIGNMENT_STRING_TABLE_COUNT = sizeof( ALIGNMENT_STRING_TABLE
 
 const Property::Index GET_VISUAL_INDEX_FOR_STATE[][Button::STATE_COUNT] =
 {
-  { Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, Toolkit::Button::Property::UNSELECTED_VISUAL },
-  { Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, Toolkit::Button::Property::SELECTED_VISUAL  },
-  { Toolkit::Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL },
-  { Toolkit::Button::Property::DISABLED_SELECTED_BACKGROUND_VISUAL, Toolkit::Button::Property::DISABLED_SELECTED_VISUAL }
+  { Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, Toolkit::DevelButton::Property::UNSELECTED_VISUAL },
+  { Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, Toolkit::DevelButton::Property::SELECTED_VISUAL  },
+  { Toolkit::DevelButton::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL },
+  { Toolkit::DevelButton::Property::DISABLED_SELECTED_BACKGROUND_VISUAL, Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL }
 };
 
 /**
@@ -1138,32 +1141,32 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope
 
       case Toolkit::Button::Property::UNSELECTED_STATE_IMAGE: // Legacy Tizen 3.0
       {
-        GetImplementation( button ).CreateVisualsForComponent( Toolkit::Button::Property::UNSELECTED_VISUAL, value, DepthIndex::CONTENT );
+        GetImplementation( button ).CreateVisualsForComponent( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, value, DepthIndex::CONTENT );
         break;
       }
       case Toolkit::Button::Property::DISABLED_STATE_IMAGE:  // Legacy Tizen 3.0
       {
-        GetImplementation( button ).CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL, value, DepthIndex::CONTENT );
+        GetImplementation( button ).CreateVisualsForComponent( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL, value, DepthIndex::CONTENT );
         break;
       }
       case Toolkit::Button::Property::SELECTED_STATE_IMAGE:  // Legacy Tizen 3.0
       {
-        GetImplementation( button ).CreateVisualsForComponent( Toolkit::Button::Property::SELECTED_VISUAL, value, DepthIndex::CONTENT );
+        GetImplementation( button ).CreateVisualsForComponent( Toolkit::DevelButton::Property::SELECTED_VISUAL, value, DepthIndex::CONTENT );
         break;
       }
-      case Toolkit::Button::Property::UNSELECTED_VISUAL:
-      case Toolkit::Button::Property::SELECTED_VISUAL:
-      case Toolkit::Button::Property::DISABLED_SELECTED_VISUAL:
-      case Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::UNSELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::SELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL:
       {
         GetImplementation( button ).CreateVisualsForComponent( index, value, DepthIndex::CONTENT );
         break;
       }
 
-      case Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL:
-      case Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL:
-      case Toolkit::Button::Property::DISABLED_SELECTED_BACKGROUND_VISUAL:
-      case Toolkit::Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_SELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL:
       {
         GetImplementation( button ).CreateVisualsForComponent( index , value, DepthIndex::BACKGROUND);
         break;
@@ -1172,14 +1175,14 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope
       case Toolkit::Button::Property::UNSELECTED_COLOR:
       {
         DALI_LOG_WARNING("[%s] Using deprecated Property Button::Property::UNSELECTED_COLOR instead use Button::Property::UNSELECTED_BACKGROUND_VISUAL\n", __FUNCTION__);
-        GetImplementation( button ).SetColor( value.Get< Vector4 >(), Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL );
+        GetImplementation( button ).SetColor( value.Get< Vector4 >(), Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL );
         break;
       }
 
       case Toolkit::Button::Property::SELECTED_COLOR:
       {
         DALI_LOG_WARNING("[%s] Using deprecated Property Button::Property::SELECTED_COLOR instead use Button::Property::SELECTED_BACKGROUND_VISUAL\n", __FUNCTION__);
-        GetImplementation( button ).SetColor( value.Get< Vector4 >(), Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL );
+        GetImplementation( button ).SetColor( value.Get< Vector4 >(), Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL );
         break;
       }
 
@@ -1204,7 +1207,7 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope
         break;
       }
 
-      case Toolkit::Button::Property::LABEL_RELATIVE_ALIGNMENT:
+      case Toolkit::DevelButton::Property::LABEL_RELATIVE_ALIGNMENT:
       {
         Button::Align labelAlignment(END);
         Scripting::GetEnumeration< Button::Align> ( value.Get< std::string >().c_str(),
@@ -1212,6 +1215,22 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope
                                                     labelAlignment );
 
         GetImplementation( button ).SetLabelAlignment( labelAlignment );
+        GetImplementation( button ).RelayoutRequest();
+        break;
+      }
+
+      case Toolkit::DevelButton::Property::LABEL_PADDING:
+      {
+        Vector4 padding ( value.Get< Vector4 >() );
+        GetImplementation( button ).SetLabelPadding( Padding( padding.x, padding.y, padding.z, padding.w ) );
+        break;
+      }
+
+      case Toolkit::DevelButton::Property::VISUAL_PADDING:
+      {
+        Vector4 padding ( value.Get< Vector4 >() );
+        GetImplementation( button ).SetForegroundPadding( Padding( padding.x, padding.y, padding.z, padding.w ) );
+        GetImplementation( button ).RelayoutRequest();
         break;
       }
     }
@@ -1266,30 +1285,30 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
 
       case Toolkit::Button::Property::UNSELECTED_STATE_IMAGE:
       {
-        value = GetImplementation( button ).GetUrlForImageVisual( Toolkit::Button::Property::UNSELECTED_VISUAL );
+        value = GetImplementation( button ).GetUrlForImageVisual( Toolkit::DevelButton::Property::UNSELECTED_VISUAL );
         break;
       }
 
       case Toolkit::Button::Property::SELECTED_STATE_IMAGE:
       {
-        value = GetImplementation( button ).GetUrlForImageVisual( Toolkit::Button::Property::SELECTED_VISUAL );
+        value = GetImplementation( button ).GetUrlForImageVisual( Toolkit::DevelButton::Property::SELECTED_VISUAL );
         break;
       }
 
       case Toolkit::Button::Property::DISABLED_STATE_IMAGE:
       {
-        value = GetImplementation( button ).GetUrlForImageVisual( Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL );
+        value = GetImplementation( button ).GetUrlForImageVisual( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL );
         break;
       }
 
-      case Toolkit::Button::Property::UNSELECTED_VISUAL:
-      case Toolkit::Button::Property::SELECTED_VISUAL:
-      case Toolkit::Button::Property::DISABLED_SELECTED_VISUAL:
-      case Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL:
-      case Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL:
-      case Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL:
-      case Toolkit::Button::Property::DISABLED_SELECTED_BACKGROUND_VISUAL:
-      case Toolkit::Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::UNSELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::SELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL:
+      case Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_SELECTED_BACKGROUND_VISUAL:
+      case Toolkit::DevelButton::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL:
       case Toolkit::Button::Property::LABEL:
       {
         Property::Map visualProperty;
@@ -1318,7 +1337,7 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
         break;
       }
 
-      case Toolkit::Button::Property::LABEL_RELATIVE_ALIGNMENT:
+      case Toolkit::DevelButton::Property::LABEL_RELATIVE_ALIGNMENT:
       {
         const char* alignment = Scripting::GetEnumerationName< Button::Align >( GetImplementation( button ).GetLabelAlignment(),
                                                                                 ALIGNMENT_STRING_TABLE,
@@ -1330,6 +1349,19 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
 
         break;
       }
+
+      case Toolkit::DevelButton::Property::LABEL_PADDING:
+      {
+        Padding padding = GetImplementation( button ).GetLabelPadding();
+        value = Vector4( padding.x, padding.y, padding.top, padding.bottom);
+        break;
+      }
+
+      case Toolkit::DevelButton::Property::VISUAL_PADDING:
+      {
+        Padding padding = GetImplementation( button ).GetForegroundPadding();
+        value = Vector4( padding.x, padding.y, padding.top, padding.bottom);
+      }
     }
   }
 
@@ -1366,7 +1398,7 @@ Padding Button::GetForegroundPadding()
 // Legacy code needed whilst Color can be set by direct Property setting ( deprecated ) instead of setting a Visual
 void Button::SetColor( const Vector4& color, Property::Index visualIndex )
 {
-  if ( visualIndex == Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL )
+  if ( visualIndex == Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL )
   {
     mSelectedColor = color;
   }
@@ -1419,7 +1451,7 @@ void Button::SetUnselectedImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::UNSELECTED_VISUAL, filename, DepthIndex::CONTENT );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, filename, DepthIndex::CONTENT );
   }
 }
 
@@ -1427,7 +1459,7 @@ void Button::SetBackgroundImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
   }
 }
 
@@ -1435,7 +1467,7 @@ void Button::SetSelectedImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::SELECTED_VISUAL, filename, DepthIndex::CONTENT );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::SELECTED_VISUAL, filename, DepthIndex::CONTENT );
   }
 }
 
@@ -1443,7 +1475,7 @@ void Button::SetSelectedBackgroundImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
   }
 }
 
@@ -1451,7 +1483,7 @@ void Button::SetDisabledBackgroundImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
   }
 }
 
@@ -1459,7 +1491,7 @@ void Button::SetDisabledImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL, filename, DepthIndex::CONTENT );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL, filename, DepthIndex::CONTENT );
   }
 }
 
@@ -1467,7 +1499,7 @@ void Button::SetDisabledSelectedImage( const std::string& filename )
 {
   if( !filename.empty() )
   {
-    CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_SELECTED_VISUAL, filename, DepthIndex::CONTENT );
+    CreateVisualsForComponent( Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL, filename, DepthIndex::CONTENT );
   }
 }
 
@@ -1526,7 +1558,7 @@ void Button::SetSelectedImage( Image image )
 Actor Button::GetButtonImage() const
 {
   DALI_LOG_WARNING("Button::GetButtonImage @DEPRECATED_1_0.50\n");
-  Actor imageView = Toolkit::ImageView::New( GetUrlForImageVisual( Toolkit::Button::Property::UNSELECTED_VISUAL ) );
+  Actor imageView = Toolkit::ImageView::New( GetUrlForImageVisual( Toolkit::DevelButton::Property::UNSELECTED_VISUAL ) );
 
   return imageView;
 }
@@ -1534,7 +1566,7 @@ Actor Button::GetButtonImage() const
 Actor Button::GetSelectedImage() const
 {
   DALI_LOG_WARNING("Button::GetSelectedImage @DEPRECATED_1_0.50\n");
-  Actor imageView = Toolkit::ImageView::New( GetUrlForImageVisual( Toolkit::Button::Property::SELECTED_VISUAL ) );
+  Actor imageView = Toolkit::ImageView::New( GetUrlForImageVisual( Toolkit::DevelButton::Property::SELECTED_VISUAL ) );
 
   return imageView;
 }
index dc123cc..a079cd5 100644 (file)
@@ -24,7 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
-#include <dali-toolkit/public-api/controls/buttons/button.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
index 4e96f14..3391bae 100644 (file)
@@ -30,6 +30,7 @@
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 
 #if defined(DEBUG_ENABLED)
   extern Debug::Filter* gLogButtonFilter;
@@ -164,12 +165,12 @@ void PushButton::SetProperty( BaseObject* object, Property::Index propertyIndex,
     {
       case Toolkit::PushButton::Property::UNSELECTED_ICON:
       {
-        pushButtonImpl.CreateVisualsForComponent( Toolkit::Button::Property::UNSELECTED_VISUAL, value, DepthIndex::CONTENT );
+        pushButtonImpl.CreateVisualsForComponent( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, value, DepthIndex::CONTENT );
         break;
       }
       case Toolkit::PushButton::Property::SELECTED_ICON:
       {
-        pushButtonImpl.CreateVisualsForComponent( Toolkit::Button::Property::SELECTED_VISUAL, value, DepthIndex::CONTENT );
+        pushButtonImpl.CreateVisualsForComponent( Toolkit::DevelButton::Property::SELECTED_VISUAL, value, DepthIndex::CONTENT );
         break;
       }
       case Toolkit::PushButton::Property::ICON_ALIGNMENT:
index 68b2567..3ccf2d4 100644 (file)
@@ -61,44 +61,15 @@ class Button;
  *
  * 'Visual' describes not just traditional images like png, bmp but refers to whatever is used to show the button, it could be a color, gradient or some other kind of renderer.
  *
- * The button's appearance can be modified by setting properties for the various images.
+ * The button's appearance can be modified by setting properties for the various visuals/images.
  *
  * It is not mandatory to set all visuals. A button could be defined only by setting its \e background visual or by setting its \e background and \e selected visuals.
  *
- * The \e button visual is shown over the \e background visual..
+ * The \e button visual is shown over the \e background visual.
  * When pressed the unselected visuals are replaced by the \e selected visual. The text label is always placed on the top of all images.
  *
  * When the button is disabled, \e background, \e button and \e selected visuals are replaced by their \e disabled visuals.
  *
-
- *
-  * @brief A control which renders a short text string.
- *
- * Text labels are lightweight, non-editable and do not respond to user input.
- *
- *
- * @section ButtonProperties Properties
- * |%Property enum                                         |String name                             |Type          |Writable|Animatable|
- * |-------------------------------------------------------|----------------------------------------|--------------|--------|----------|
- * | Property::DISABLED                                    | disabled                               |  BOOLEAN     | Y      | N        |
- * | Property::AUTO_REPEATING                              | autoRepeating                          |  BOOLEAN     | Y      | N        |
- * | Property::INITIAL_AUTO_REPEATING_DELAY                | initialAutoRepeatingDelay              |  FLOAT       | Y      | N        |
- * | Property::NEXT_AUTO_REPEATING_DELAY                   | nextAutoRepeatingDelay                 |  FLOAT       | Y      | N        |
- * | Property::TOGGLABLE                                   | togglable                              |  BOOLEAN     | Y      | N        |
- * | Property::SELECTED                                    | selected                               |  BOOLEAN     | Y      | N        |
- * | Property::LABEL                                       | label                                  |  MAP         | Y      | N        |
- * | Property::UNSELECTED_STATE_VISUAL                     | unselectedVisual                       |  MAP         | Y      | N        |
- * | Property::SELECTED_VISUAL                             | selectedVisual                         |  MAP         | Y      | N        |
- * | Property::DISABLED_SELECTED_VISUAL                    | disabledSelectedVisual                 |  MAP         | Y      | N        |
- * | Property::DISABLED_UNSELECTED_VISUAL                  | disabledUnselectedVisual               |  MAP         | Y      | N        |
- * | Property::UNSELECTED_BACKGROUND_VISUAL                | unselectedBackgroundVisual             |  MAP         | Y      | N        |
- * | Property::SELECTED_BACKGROUND_VISUAL                  | selectedBackgroundVisual               |  MAP         | Y      | N        |
- * | Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL       | disabledUnselectedBackgroundVisual     |  MAP         | Y      | N        |
- * | Property::DISABLED_SELECTED_BACKGROUND_VISUAL         | disabledSelectedBackgroundVisual       |  MAP         | Y      | N        |
- * | Property::LABEL_RELATIVE_ALIGNMENT                    | labelRelativeAlignment                 |  STRING      | Y      | N        |
- * -------------------------------------------------------------------------------------------------------------------------------------
- *
- * Note, *_VISUAL properties of type MAP can also be passed a uri of type STRING
  *
  * Signals
  * | %Signal Name     | Method                      |
@@ -231,70 +202,7 @@ public:
        * @brief name "labelText", type std::string
        * @SINCE_1_0.0
        */
-      LABEL_TEXT,
-
-      /**
-       * @brief name "unselectedVisual", type string if it is a url, map otherwise
-       * @details Sets the unselected button foreground/icon visual
-       * @SINCE_1_2.XX
-       */
-      UNSELECTED_VISUAL,
-
-      /**
-       * @brief name "selectedImage", type string if it is a url, map otherwise
-       * @details Sets the selected button foreground/icon visual
-       * @SINCE_1_2.XX
-       */
-      SELECTED_VISUAL,
-
-      /**
-       * @brief name "disabledSelectedVisual", type string if it is a url, map otherwise
-       * @details Sets the disabled selected state foreground/icon button visual
-       * @SINCE_1_2.XX
-       */
-      DISABLED_SELECTED_VISUAL,
-
-      /**
-       * @brief name "disabledUnSelectedVisual", type string if it is a url, map otherwise
-       * @details Sets the disabled unselected state foreground/icon visual
-       * @SINCE_1_2.XX
-       */
-      DISABLED_UNSELECTED_VISUAL,
-
-      /**
-       * @brief name "unselectedBackgroundVisual", type string if it is a url, map otherwise
-       * @details Sets the disabled in the unselected state background, button visual
-       * @SINCE_1_2.XX
-       */
-      UNSELECTED_BACKGROUND_VISUAL,
-
-      /**
-       * @brief name "selectedBackgroundVisual", type string if it is a url, map otherwise
-       * @details Sets the selected background button visual
-       * @SINCE_1_2.XX
-       */
-      SELECTED_BACKGROUND_VISUAL,
-
-      /**
-       * @brief name "disabledUnselectedBackgroundVisual", type string if it is a url, map otherwise
-       * @details Sets the disabled while unselected background button visual
-       * @SINCE_1_2.XX
-       */
-      DISABLED_UNSELECTED_BACKGROUND_VISUAL,
-
-      /**
-       * @brief name "disabledSelectedBackgroundVisual", type string if it is a url, map otherwise
-       * @details Sets the disabled while selected background button visual
-       * @SINCE_1_2.XX
-       */
-      DISABLED_SELECTED_BACKGROUND_VISUAL,
-
-      /**
-       * @brief name "labelRelativeAlignment", type STRING
-       * @details Sets the position of the the label in relation to the foreground/icon if both present
-       * @SINCE_1_2.XX
-       */
-      LABEL_RELATIVE_ALIGNMENT,
+      LABEL_TEXT
     };
   };
 
@@ -528,10 +436,10 @@ public:
   void SetUnselectedImage( const std::string& filename ) DALI_DEPRECATED_API;
 
   /**
-   * @DEPRECATED_1_1.32 Use styling
-   * Use Property::UNSELECTED_BACKGROUND_VISUAL
+   * @DEPRECATED_1_1.32 Use styling Set Control::Property::BACKGROUND which is same as un-selected background
+   * Or use DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL
    *
-   * @brief Sets the unselected background image.
+   * @brief Sets the background image.
    *
    * @SINCE_1_0.0
    * @param[in] filename The background image.
@@ -549,8 +457,8 @@ public:
   void SetSelectedImage( const std::string& filename ) DALI_DEPRECATED_API;
 
   /**
-   * @DEPRECATED_1_2.32 Use styling file
-   * Use Property::SELECTED_BACKGROUND_VISUAL
+   * @DEPRECATED_1_1.32 Set Control::Property::BACKGROUND which is same as un-selected background
+   * Or use DevelButton::Property::SELECTED_BACKGROUND_VISUAL
    *
    * @brief Sets the selected background image.
    *
@@ -560,8 +468,8 @@ public:
   void SetSelectedBackgroundImage( const std::string& filename ) DALI_DEPRECATED_API;
 
   /**
-   * @DEPRECATED_1_1.32 Use styling file
-   * Use Property::DISABLED_SELECTED_BACKGROUND_VISUAL
+   * @DEPRECATED_1_1.32 Only able to set Property::DISABLED_STATE_IMAGE
+   * Or use DevelButton::Property::DISABLED_SELECTED_BACKGROUND_VISUAL
    *
    * @brief Sets the disabled background image.
    *
@@ -581,8 +489,8 @@ public:
   void SetDisabledImage( const std::string& filename ) DALI_DEPRECATED_API;
 
   /**
-   * @DEPRECATED_1_1.32 Use styling file
-   * Use Property::DISABLED_SELECTED_VISUAL
+   * @DEPRECATED_1_1.32 Use Property::DISABLED_STATE_IMAGE which provides same disabled image for un/selected
+   * Or DevelButton::Property::DISABLED_SELECTED_VISUAL to disable selected visual.
    *
    * @brief Sets the disabled selected button image.
    *
index 78b8a87..4f33d78 100644 (file)
     "Button":
     {
       "initialAutoRepeatingDelay":2.0,
-      "nextAutoRepeatingDelay":0.9,
-       "label":
-       {
-         "visualType": "TEXT",
-         "horizontalAlignment": "CENTER",
-         "pointSize" : 15.0, // Point size must always be provided to Text Visual
-         "verticalAlignment": "CENTER"
-       }
+      "nextAutoRepeatingDelay":0.9
       // Note: Visuals added to Button will be used in all derived buttons unless overridden.
     },
     "PushButton":
       "autoRepeating":false,
       "togglable":false,
       "labelPadding":[ 12.0, 12.0, 12.0, 12.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "horizontalAlignment": "CENTER",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedBackgroundVisual":
        {
          "visualType": "IMAGE",
     "CheckBoxButton":
     {
       "styles":["Button"],
+      "labelPadding":[ 12.0, 12.0, 0.0, 0.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedBackgroundVisual":
       {
         "visualType": "IMAGE",
     "RadioButton":
     {
       "styles":["Button"],
+      "labelPadding":[ 12.0, 12.0, 0.0, 0.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedBackgroundVisual":
       {
         "visualType": "IMAGE",
index 7bc8ffb..970fb13 100644 (file)
     "Button":
     {
       "initialAutoRepeatingDelay":2.0,
-      "nextAutoRepeatingDelay":0.9,
-      "label":
-       {
-         "visualType": "TEXT",
-         "horizontalAlignment": "CENTER",
-         "pointSize" : 15.0, // Point size must always be provided to Text Visual
-         "verticalAlignment": "CENTER"
-       }
+      "nextAutoRepeatingDelay":0.9
       // Note: Visuals added to Button will be used in all derived buttons unless overridden.
     },
     "PushButton":
       "autoRepeating":false,
       "togglable":false,
       "labelPadding":[ 12.0, 12.0, 12.0, 12.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "horizontalAlignment": "CENTER",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedBackgroundVisual":
        {
          "visualType": "IMAGE",
     "CheckBoxButton":
     {
       "styles":["Button"],
+      "labelPadding":[ 12.0, 12.0, 0.0, 0.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedVisual":
       {
         "visualType": "IMAGE",
     "RadioButton":
     {
       "styles":["Button"],
+      "labelPadding":[ 12.0, 12.0, 0.0, 0.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedVisual":
       {
         "visualType": "IMAGE",
index 5bf3c13..aec2ff3 100644 (file)
     "Button":
     {
       "initialAutoRepeatingDelay":2.0,
-      "nextAutoRepeatingDelay":0.9,
-       "label":
-       {
-         "visualType": "TEXT",
-         "horizontalAlignment": "CENTER",
-         "pointSize" : 15.0, // Point size must always be provided to Text Visual
-         "verticalAlignment": "CENTER"
-       }
+      "nextAutoRepeatingDelay":0.9
       // Note: Visuals added to Button will be used in all derived buttons unless overridden.
     },
     "PushButton":
       "autoRepeating":false,
       "togglable":false,
       "labelPadding":[ 12.0, 12.0, 12.0, 12.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "horizontalAlignment": "CENTER",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedBackgroundVisual":
        {
          "visualType": "IMAGE",
     "CheckBoxButton":
     {
       "styles":["Button"],
+      "labelPadding":[ 12.0, 12.0, 0.0, 0.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedVisual":
       {
         "visualType": "IMAGE",
     "RadioButton":
     {
       "styles":["Button"],
+      "labelPadding":[ 12.0, 12.0, 0.0, 0.0 ],
+      "label":
+       {
+         "visualType": "TEXT",
+         "pointSize" : 15.0, // Point size must always be provided to Text Visual
+         "verticalAlignment": "CENTER"
+       },
       "unselectedVisual":
       {
         "visualType": "IMAGE",