summaryrefslogtreecommitdiff
path: root/pages/develop/legacy/tutorial
diff options
context:
space:
mode:
authorPierre Couderc <pierre@couderc.eu>2017-11-24 02:09:52 -0800
committerapache <apache@e5-web1.enlightenment.org>2017-11-24 02:09:52 -0800
commit15f2b7e616f9ecae3280a46b1de352be5cb0d175 (patch)
tree6035f2b9e4c86d6421e16a6066e09af288727d51 /pages/develop/legacy/tutorial
parent823fedfcf7d95c435df198b30c17ee9445136843 (diff)
Wiki page button changed with summary [] by Pierre Couderc
Diffstat (limited to 'pages/develop/legacy/tutorial')
-rw-r--r--pages/develop/legacy/tutorial/basic/button.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/pages/develop/legacy/tutorial/basic/button.txt b/pages/develop/legacy/tutorial/basic/button.txt
index a12c90c66..af4fbf8b8 100644
--- a/pages/develop/legacy/tutorial/basic/button.txt
+++ b/pages/develop/legacy/tutorial/basic/button.txt
@@ -2,7 +2,7 @@
2 2
3=== Button styles === 3=== Button styles ===
4 4
5//**__Basic text button__**// 5**Basic text button**
6 6
7As seen in [[develop/efl/start|Get started with EFL]] tutorial, a text-only 7As seen in [[develop/efl/start|Get started with EFL]] tutorial, a text-only
8button is created as follows: 8button is created as follows:
@@ -24,7 +24,7 @@ button is created as follows:
24 evas_object_show(button_text); 24 evas_object_show(button_text);
25</code> 25</code>
26 26
27//**__Basic icon button__**// 27**Basic icon button**
28 28
29Instead of a button having only some text, you can also opt to having an 29Instead of a button having only some text, you can also opt to having an
30icon-only button. 30icon-only button.
@@ -54,7 +54,7 @@ deriving from the Elementary Container Class may match. This sets new content
54to a given part. If any object was already set as a content object, it will be 54to a given part. If any object was already set as a content object, it will be
55deleted. 55deleted.
56 56
57//**__Icon and text button__**// 57**Icon and text button**
58 58
59You can also have buttons holding both an icon and a label. 59You can also have buttons holding both an icon and a label.
60 60
@@ -75,7 +75,7 @@ You can also have buttons holding both an icon and a label.
75 evas_object_show(button_icon_text); 75 evas_object_show(button_icon_text);
76</code> 76</code>
77 77
78//**__Disabled button__**// 78**Disabled button**
79 79
80If you want to disable your button but still visible: 80If you want to disable your button but still visible:
81 81
@@ -87,7 +87,7 @@ elm_object_disabled_set(button, EINA_TRUE);
87 87
88Elementary buttons respond to user interactions thanks to several events. 88Elementary buttons respond to user interactions thanks to several events.
89 89
90//**__Click event__**// 90**Click event**
91 91
92The “click” event is the most basic and well-known one. The following code 92The “click” event is the most basic and well-known one. The following code
93snippet will change the text of a button upon a click event: a press followed 93snippet will change the text of a button upon a click event: a press followed
@@ -103,7 +103,7 @@ _button_click_cb(void *data, Evas_Object *button, void *event_info){
103evas_object_smart_callback_add(button_text, "clicked", button_click_cb, NULL); 103evas_object_smart_callback_add(button_text, "clicked", button_click_cb, NULL);
104</code> 104</code>
105 105
106//**__Press/unpress events __**// 106**Press/unpress events **
107 107
108The button can also respond to the press and unpress events instead of the 108The button can also respond to the press and unpress events instead of the
109whole click. 109whole click.
@@ -125,7 +125,7 @@ evas_object_smart_callback_add(button_icon, "pressed", _button_press_cb, NULL);
125evas_object_smart_callback_add(button_icon, "unpressed", _button_unpress_cb, NULL); 125evas_object_smart_callback_add(button_icon, "unpressed", _button_unpress_cb, NULL);
126</code> 126</code>
127 127
128//**__Repeated events__**// 128**Repeated events**
129 129
130The button can also receive several events in case it is being held by the 130The button can also receive several events in case it is being held by the
131user. Timings such as the initial timeout and the repeat interval can be set. 131user. Timings such as the initial timeout and the repeat interval can be set.
@@ -154,7 +154,7 @@ _button_repeat_cb(void *data, Evas_Object *button, void *event_info){
154 evas_object_smart_callback_add(button_icon_text, "repeated", _button_repeat_cb, NULL); 154 evas_object_smart_callback_add(button_icon_text, "repeated", _button_repeat_cb, NULL);
155</code> 155</code>
156 156
157//**__Focused/unfocused events__**// 157**Focused/unfocused events**
158 158
159The event Focused is equivalent to click indeed callback is called when you 159The event Focused is equivalent to click indeed callback is called when you
160are "focused" on the button. So, you are unfocused when you are not focused on 160are "focused" on the button. So, you are unfocused when you are not focused on
@@ -187,7 +187,7 @@ _button_unfocused_cb(void * data, Evas_Object *button, void *event_info){
187 evas_object_smart_callback_add(button, "unfocused", _button_unfocused_cb, NULL); 187 evas_object_smart_callback_add(button, "unfocused", _button_unfocused_cb, NULL);
188</code> 188</code>
189\\ 189\\
190**//The whole code://** {{code_c/tutorial/basic/button.c}} 190**The whole code:** {{code_c/tutorial/basic/button.c}}
191 191
192==== Next Part ==== 192==== Next Part ====
193 193