Update programming guide after removing deprecated APIs from Adaptor
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / script-hello.h
1 /*! \page script-hello Scripting Hello World
2  *
3  * <h2 class="pg">Hello World - JSON layout</h2>
4  *
5  * The following JSON code is the minimum required to put the sentence "Hello World" on the screen.
6  *
7  * @code
8  * {
9  *     "fonts":
10  *     {
11  *         "freesans": {"name": "FreeSans", "point-size": 12.0, "weight": "WEIGHT_REGULAR" }
12  *     },
13  *     "actors":
14  *     [
15  *         {"name":"text-actor",
16  *          "type":"Text",
17  *          "text":"Hello World",
18  *          "font":"freesans",
19  *          "parent-origin":"CENTER"
20  *         }
21  *     ]
22  * }
23  * @endcode
24  *
25  * The following c++ code loads the JSON file
26  *
27  * @code
28  * Builder builder = Builder::New();
29  *
30  * std::string json_data(ReadFile("layout.json"));
31  *
32  * builder.LoadFromString(json_data);
33  *
34  * Actor actor = builder.GetActor("text-actor");
35  *
36  * Stage::GetCurrent().Add(actor);
37  * @endcode
38  *
39  * <h2 class="pg">Hello World - Javascript</h2>
40  *
41  * Hello world can also be executed via Javascript.
42  *
43  * The Dali script application is needed to run the Javascript which provides a Javascript runtime and an interface to Dali.
44  *
45  * @code
46  * daliscript hello-world.js
47  * @endcode
48  *
49  * The TextActor control to display Hello World can be constructed using Javascript dot notation accessing Dali Actor Properties.
50  *
51  * @code
52  * var textActor = Dali.TextActor();
53  *
54  * textActor.text          = "Hello World";
55  * textActor.font          = "FreeSans";
56  * textActor.font-weight   = "WEIGHT_REGULAR";
57  * textActor.parent-origin = "CENTER";
58  *
59  * Dali.Run();
60  * @endcode
61  *
62  */
63
64