[SAMPLE APP][DATA-CONTROL-CONSUMER] Ui-builder - connections
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Thu, 8 Oct 2015 13:42:30 +0000 (15:42 +0200)
committerMichal Skorupinski <m.skorupinsk@samsung.com>
Tue, 13 Oct 2015 12:13:48 +0000 (14:13 +0200)
Change-Id: Ia5f2d6f3330690dfbdb3f88e97144a42c1962073
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
org.tizen.sampledescriptions/html/images/data_control_consumer/data-control-consumer-ui-builder-connections.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_n/data_control_consumer_sd_mn.htm

diff --git a/org.tizen.sampledescriptions/html/images/data_control_consumer/data-control-consumer-ui-builder-connections.png b/org.tizen.sampledescriptions/html/images/data_control_consumer/data-control-consumer-ui-builder-connections.png
new file mode 100644 (file)
index 0000000..d6a58ec
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/data_control_consumer/data-control-consumer-ui-builder-connections.png differ
index 8cf23f8..787610f 100644 (file)
                <img alt="Naviframe view" height="364" hspace="20" src="../images/data_control_consumer/data_control_consumer_naviframe_view.png" />
        </p>
 
+       <h4>Connections</h4>
+       <p>In order to design the application's view switching, the connections are used. You can access them via the 'Storyboard' tab of the UI-builder (check Tizen SDK help for details).</p>
+
+       <p class="figure">Figure: UI-Builder connections view</p>
+<p id="ui-builder-connections-view" style="text-align:center;">
+       <img alt="UI-Builder connections view" height="550" hspace="20" src="../images/data_control_consumer/data-control-consumer-ui-builder-connections.png" />
+</p>
+
+       <p>The view1 (the Naviframe view) is connected with the view2. This indicates that the view2 is used as the naviframe's default view. When the user adds a connection between other views it will be displayed here. Note that a new callback code will be created (file  will be created if required) in <span style="font-family: Courier New,Courier,monospace">src/managed/connection</span> folder. Also a 'pre' and 'post' functions will be added to one of the files in <span style="font-family: Courier New,Courier,monospace">src/event_handler</span> folder.</p>
+
+       <p>On view change, the below callback function is invoked.</p>
+       <pre class="prettyprint">
+void view2_connection_to_sql_button_onclicked(uib_view2_view_context *vc, Evas_Object *obj, void *event_info)
+{
+&nbsp;&nbsp;&nbsp;view2_to_sql_button_onclicked(vc, obj, event_info);
+&nbsp;&nbsp;&nbsp;Elm_Object_Item *navi_item = change_page(vc->parent, "SQL", NULL, NULL, "view3", NULL);
+&nbsp;&nbsp;&nbsp;view2_to_sql_button_onclicked_post(navi_item, vc, obj, event_info);
+}
+       </pre>
+       <p>The <span style="font-family: Courier New,Courier,monospace">change_page()</span> function uses the <span style="font-family: Courier New,Courier,monospace">elm_naviframe_item_push()</span> to switch the views. Note that there is no reverse connection from view3 to view2. Instead there is a callback function added to the <span style="font-family: Courier New,Courier,monospace">to_map_button</span> widget that invokes <span style="font-family: Courier New,Courier,monospace">elm_naviframe_item_pop()</span> function, which avoids recurring pages stacking.</p>
 
 <!-- ********************************************************************************** -->