Merge "Changed text controls to re-apply style after system font size change" into...
[platform/core/uifw/dali-toolkit.git] / docs / content / shared-javascript-and-cpp-documentation / popup.md
index c302f82..af526f4 100644 (file)
@@ -44,7 +44,7 @@ Example: Image only popup (using the content field):
 ### Example content: {#popupfieldexample}
   
 - Title:   TextLabel
-- Content: ImageActor or TextLabel
+- Content: ImageView or TextLabel
 - Footer:  PushButton or Actor containing two PushButtons
   
 ## Setting and getting the display state {#popupdisplaystate}
@@ -86,7 +86,7 @@ The default to fading in and out.
   
 The Popup can be configured to a preset type by using named types within the type-registry.
   
-These types are modifications / specialisations of a Popup. They provide the library user with a shortcut way of creating a specific type of Popup.
+These types are modifications / specializations of a Popup. They provide the library user with a shortcut way of creating a specific type of Popup.
   
 
 The Popup control features a "Toast" popup type. This is a Popup that appears at the bottom of the screen, typically with some text. They are normally for informational purposes only.
@@ -111,7 +111,7 @@ Here is the code to produce the above example:
   
 C++
 ~~~{.cpp}
-TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( "popup-toast" );
+TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( "PopupToast" );
 if( typeInfo )
 {
   BaseHandle baseHandle = typeInfo.CreateInstance();
@@ -180,32 +180,32 @@ The ConfirmationPopup control provides a simple interface for providing automati
   
 ConfirmationPopup will automatically provide signals for 1 or 2 controls.
 Note: The controls do not need to be PushButtons.
-These signals are dynamically created. The controls (typically PushButtons) must be specifially named so the ConfirmationPopup can locate them.
+These signals are dynamically created. The controls (typically PushButtons) must be specifically named so the ConfirmationPopup can locate them.
   
 ## Step 1 {#popupconfirmationstep1}
 Name your controls.
   
-- Name your first control, or OK control:      "control-ok"
-- Name your second control, or Cancel control: "control-cancel"
+- Name your first control, or OK control:      "controlOk"
+- Name your second control, or Cancel control: "controlCancel"
   
 ## Step 2 {#popupconfirmationstep2}
 Tell the ConfirmationPopup the names of the signals to connect to for each control.
 For example, if we are using PushButtons as controls, the signal name would be "clicked".
 This allows us to use different control types.
   
-- Set property "connect-signal-ok-selected" with the name of the signal to connect to within the first control.
-- Set property "connect-signal-cancel-selected" with the name of the signal to connect to within the second control.
+- Set property "connectSignalOkSelected" with the name of the signal to connect to within the first control.
+- Set property "connectSignalCancelSelected" with the name of the signal to connect to within the second control.
   
 ## Step 3 {#popupconfirmationstep3}
 Connect to the following respective signals within ConfirmationPopup:
   
-- Connect to signal "control-signal-ok" to be signalled for the first control.
-- Connect to signal "control-signal-cancel" to be signalled for the second control.
+- Connect to signal "controlSignalOk" to be signalled for the first control.
+- Connect to signal "controlSignalCancel" to be signalled for the second control.
   
 The ConfirmationPopup will dynamically make the connection between the signalling control, and your signal handler.
   
-This allows connection of signals within both C++, JSON and Javascript APIs.
-If more manual control or customisable layout is needed, then it is recommended to use the Popup widget directly for full control.
+This allows connection of signals within both C++, JSON and JavaScript APIs.
+If more manual control or customizable layout is needed, then it is recommended to use the Popup widget directly for full control.
   
 The JSON code example at the bottom of this document uses the ConfirmationPopup to allow signal connection from within the JSON description.
   
@@ -216,7 +216,7 @@ This example creates a Popup with:
   
 - Title:   TextLabel
 - Content: TextLabel
-- Footer:  ImageActor (an image border around the buttons)
+- Footer:  ImageView (an image border around the buttons)
             - PushButton (OK control)
             - PushButton (Cancel control)
   
@@ -237,7 +237,7 @@ contentActor.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "C
 popup.SetContent( contentActor );
 
 // Create the footer: Two buttons surrounded by an image.
-ImageActor footer = ImageActor::New( ResourceImage::New( DEFAULT_CONTROL_AREA_IMAGE_PATH ) );
+ImageView footer = ImageView::New( DEFAULT_CONTROL_AREA_IMAGE_PATH );
 footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
 footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
 footer.SetSize( 0.0f, 80.0f );
@@ -307,77 +307,77 @@ This time without an image around the buttons. This could be added in the same w
   "stage": [
     {
       "type": "ConfirmationPopup",
-      "name": "confirmation-popup",
-      "parent-origin": [0.5, 0.55, 0.5],
-      "anchor-point": "CENTER",
-      "width-resize-policy": "SIZE_RELATIVE_TO_PARENT",
-      "height-resize-policy": "USE_NATURAL_SIZE",
-      "size-mode-factor": [0.65, 1.0, 1.0],
-      "tail-visibility": false,
-      "display-change-animation-duration": 1.0,
-      "contextual-mode": "NON_CONTEXTUAL",
-      "animation-mode": "ZOOM",
-      "connect-signal-ok-selected": "clicked",
-      "connect-signal-cancel-selected": "clicked",
+      "name": "confirmationPopup",
+      "parentOrigin": [0.5, 0.55, 0.5],
+      "anchorPoint": "CENTER",
+      "widthResizePolicy": "SIZE_RELATIVE_TO_PARENT",
+      "heightResizePolicy": "USE_NATURAL_SIZE",
+      "sizeModeFactor": [0.65, 1.0, 1.0],
+      "tailVisibility": false,
+      "displayChangeAnimationDuration": 1.0,
+      "contextualMode": "NON_CONTEXTUAL",
+      "animationMode": "ZOOM",
+      "connectSignalOkSelected": "clicked",
+      "connectSignalCancelSelected": "clicked",
       "title": {
         "type": "TextLabel",
         "text": "Title text",
-        "text-color": [1, 1, 1, 1]
+        "textColor": [1, 1, 1, 1]
       },
       "content": {
         "type": "TextLabel",
         "text": "Content text",
         "padding": [20, 20, 20, 0],
-        "text-color": [1, 1, 1, 1]
+        "textColor": [1, 1, 1, 1]
       },
       "footer": {
         "type": "Control",
         "size": [0, 80, 0],
-        "width-resize-policy": "FILL_TO_PARENT",
-        "height-resize-policy": "FIXED",
-        "parent-origin": "CENTER",
-        "anchor-point": "CENTER",
+        "widthResizePolicy": "FILL_TO_PARENT",
+        "heightResizePolicy": "FIXED",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
         "actors": [
           {
             "type": "PushButton",
-            "name": "control-ok",
-            "parent-origin": "CENTER_LEFT",
-            "anchor-point": "CENTER_LEFT",
+            "name": "controlOk",
+            "parentOrigin": "CENTER_LEFT",
+            "anchorPoint": "CENTER_LEFT",
             "position": [20, 0, 0],
             "size": [0, 0, 0],
-            "label-text": "OK"
+            "labelText": "OK"
           },
           {
             "type": "PushButton",
-            "name": "control-cancel",
-            "parent-origin": "CENTER_RIGHT",
-            "anchor-point": "CENTER_RIGHT",
+            "name": "controlCancel",
+            "parentOrigin": "CENTER_RIGHT",
+            "anchorPoint": "CENTER_RIGHT",
             "position": [-20, 0, 0],
             "size": [0, 0, 0],
-            "label-text": "Cancel"
+            "labelText": "Cancel"
           }
         ]
       },
       "signals": [
         {
-          "name": "control-signal-ok",
+          "name": "controlSignalOk",
           "action": "set",
-          "actor": "confirmation-popup",
-          "property": "display-state",
+          "actor": "confirmationPopup",
+          "property": "displayState",
           "value": "HIDDEN"
         },
         {
-          "name": "control-signal-cancel",
+          "name": "controlSignalCancel",
           "action": "set",
-          "actor": "confirmation-popup",
-          "property": "display-state",
+          "actor": "confirmationPopup",
+          "property": "displayState",
           "value": "HIDDEN"
         },
         {
-          "name": "touched-outside",
+          "name": "touchedOutside",
           "action": "set",
-          "actor": "confirmation-popup",
-          "property": "display-state",
+          "actor": "confirmationPopup",
+          "property": "displayState",
           "value": "HIDDEN"
         }
       ]