summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-08-07 15:36:47 +0100
committerTom Hacohen <tom@stosb.com>2015-08-07 15:36:47 +0100
commit8b09403a6af358ea622766b0b8ff45f46093aa33 (patch)
tree9d5dd48550359373955e245676c4141a34edb2ff
parentccc8d753123b8ce28e4a9b5aa50114069175ca41 (diff)
Segment control: migrate docs.
-rw-r--r--src/lib/elm_segment_control.eo184
1 files changed, 65 insertions, 119 deletions
diff --git a/src/lib/elm_segment_control.eo b/src/lib/elm_segment_control.eo
index 576111dd9..8475ac603 100644
--- a/src/lib/elm_segment_control.eo
+++ b/src/lib/elm_segment_control.eo
@@ -4,141 +4,103 @@ class Elm.Segment_Control (Elm.Layout)
4 methods { 4 methods {
5 @property item_count { 5 @property item_count {
6 get { 6 get {
7 /*@ 7 [[Get the Segment items count from segment control.
8 Get the Segment items count from segment control.
9 8
10 @return Segment items count. 9 It will just return the number of items added to segment control $obj.]]
11 10 return: int; [[Segment items count.]]
12 It will just return the number of items added to segment control $obj.
13
14 @ingroup SegmentControl */
15 return: int;
16 } 11 }
17 } 12 }
18 @property item_selected { 13 @property item_selected {
19 get { 14 get {
20 /*@ 15 [[Get the selected item.
21 Get the selected item.
22 16
23 @return The selected item or $NULL if none of segment items is 17 The selected item can be unselected with function
24 selected. 18 elm_segment_control_item_selected_set().
25 19
26 The selected item can be unselected with function 20 The selected item always will be highlighted on segment control.]]
27 elm_segment_control_item_selected_set().
28 21
29 The selected item always will be highlighted on segment control. 22 return: Elm.Widget_Item *; [[The selected item or $NULL if none of segment items is selected.]]
30 23
31 @ingroup SegmentControl */
32 return: Elm.Widget_Item *;
33 } 24 }
34 } 25 }
35 item_label_get @const { 26 item_label_get @const {
36 /*@ 27 [[Get the label of item.
37 Get the label of item.
38
39 @return The label of the item at $index.
40
41 The return value is a pointer to the label associated to the item when
42 it was created, with function elm_segment_control_item_add(), or later
43 with function elm_object_item_text_set. If no label
44 was passed as argument, it will return $NULL.
45 28
46 @see elm_object_item_text_set() for more details. 29 The return value is a pointer to the label associated to the item when
47 @see elm_segment_control_item_add() 30 it was created, with function elm_segment_control_item_add(), or later
31 with function elm_object_item_text_set. If no label
32 was passed as argument, it will return $NULL.]]
48 33
49 @ingroup SegmentControl */ 34 return: const(char)*; [[The label of the item at $index.]]
50 return: const(char)*;
51 params { 35 params {
52 @in idx: int; /*@ The index of the segment item. */ 36 @in idx: int; [[The index of the segment item.]]
53 } 37 }
54 } 38 }
55 item_insert_at { 39 item_insert_at {
56 /*@ 40 [[Insert a new item to the segment control object at specified position.
57 Insert a new item to the segment control object at specified position.
58 41
59 @return The created item or $NULL upon failure. 42 Index values must be between $0, when item will be prepended to
43 segment control, and items count, that can be get with
44 elm_segment_control_item_count_get(), case when item will be appended
45 to segment control, just like elm_segment_control_item_add().
60 46
61 Index values must be between $0, when item will be prepended to 47 Items created with this function can be deleted with function
62 segment control, and items count, that can be get with 48 elm_object_item_del() or elm_segment_control_item_del_at().
63 elm_segment_control_item_count_get(), case when item will be appended
64 to segment control, just like elm_segment_control_item_add().
65 49
66 Items created with this function can be deleted with function 50 Note: $label set to $NULL is different from empty string "".
67 elm_object_item_del() or elm_segment_control_item_del_at(). 51 If an item
52 only has icon, it will be displayed bigger and centered. If it has
53 icon and label, even that an empty string, icon will be smaller and
54 positioned at left.]]
68 55
69 @note $label set to $NULL is different from empty string "". 56 return: Elm.Widget_Item *; [[The created item or $NULL upon failure.]]
70 If an item
71 only has icon, it will be displayed bigger and centered. If it has
72 icon and label, even that an empty string, icon will be smaller and
73 positioned at left.
74
75 @see elm_segment_control_item_add()
76 @see elm_segment_control_item_count_get()
77 @see elm_object_item_del()
78
79 @ingroup SegmentControl */
80
81 return: Elm.Widget_Item *;
82 params { 57 params {
83 @in icon: Evas.Object * @optional; /*@ The icon object to use for the left side of the item. An 58 @in icon: Evas.Object * @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
84 icon can be any Evas object, but usually it is an icon created 59 @in label: const(char)* @optional; [[The label of the item.]]
85 with elm_icon_add(). */ 60 @in idx: int; [[Item position. Value should be between 0 and items count.]]
86 @in label: const(char)* @optional; /*@ The label of the item. */
87 @in idx: int; /*@ Item position. Value should be between 0 and items count. */
88 } 61 }
89 } 62 }
90 item_get @const { 63 item_get @const {
91 /*@ 64 [[Get the item placed at specified index.
92 Get the item placed at specified index.
93
94 @return The segment control item or $NULL on failure.
95 65
96 Index is the position of an item in segment control widget. Its 66 Index is the position of an item in segment control widget. Its
97 range is from $0 to <tt> count - 1 </tt>. 67 range is from $0 to <tt> count - 1 </tt>.
98 Count is the number of items, that can be get with 68 Count is the number of items, that can be get with
99 elm_segment_control_item_count_get(). 69 elm_segment_control_item_count_get().]]
100 70
101 @ingroup SegmentControl */ 71 return: Elm.Widget_Item *; [[The segment control item or $NULL on failure.]]
102 return: Elm.Widget_Item *;
103 params { 72 params {
104 @in idx: int; /*@ The index of the segment item. */ 73 @in idx: int; [[The index of the segment item.]]
105 } 74 }
106 } 75 }
107 item_del_at { 76 item_del_at {
108 /*@ 77 [[Remove a segment control item at given index from its parent, deleting it.
109 Remove a segment control item at given index from its parent,
110 deleting it.
111 78
112 Items can be added with elm_segment_control_item_add() or 79 Items can be added with elm_segment_control_item_add() or elm_segment_control_item_insert_at().]]
113 elm_segment_control_item_insert_at().
114
115 @ingroup SegmentControl */
116 80
117 params { 81 params {
118 @in idx: int; /*@ The position of the segment control item to be deleted. */ 82 @in idx: int; [[The position of the segment control item to be deleted.]]
119 } 83 }
120 } 84 }
121 item_add { 85 item_add {
122 /*@ 86 [[Append a new item to the segment control object.
123 Append a new item to the segment control object.
124
125 @return The created item or $NULL upon failure.
126 87
127 A new item will be created and appended to the segment control, i.e., will 88 A new item will be created and appended to the segment control, i.e., will
128 be set as @b last item. 89 be set as last item.
129 90
130 If it should be inserted at another position, 91 If it should be inserted at another position,
131 elm_segment_control_item_insert_at() should be used instead. 92 elm_segment_control_item_insert_at() should be used instead.
132 93
133 Items created with this function can be deleted with function 94 Items created with this function can be deleted with function
134 elm_object_item_del() or elm_object_item_del_at(). 95 elm_object_item_del() or elm_object_item_del_at().
135 96
136 @note $label set to $NULL is different from empty string "". 97 Note: $label set to $NULL is different from empty string "".
137 If an item 98 If an item
138 only has icon, it will be displayed bigger and centered. If it has 99 only has icon, it will be displayed bigger and centered. If it has
139 icon and label, even that an empty string, icon will be smaller and 100 icon and label, even that an empty string, icon will be smaller and
140 positioned at left. 101 positioned at left.]]
141 102
103 /* FIXME-doc
142 Simple example: 104 Simple example:
143 @code 105 @code
144 sc = elm_segment_control_add(win); 106 sc = elm_segment_control_add(win);
@@ -147,40 +109,24 @@ class Elm.Segment_Control (Elm.Layout)
147 elm_icon_resizable_set(ic, true, true); 109 elm_icon_resizable_set(ic, true, true);
148 elm_segment_control_item_add(sc, ic, "label"); 110 elm_segment_control_item_add(sc, ic, "label");
149 evas_object_show(sc); 111 evas_object_show(sc);
150 @endcode 112 @endcode */
151
152 @see elm_segment_control_item_insert_at()
153 @see elm_object_item_del()
154
155 @ingroup SegmentControl */
156 113
157 return: Elm.Widget_Item *; 114 return: Elm.Widget_Item *; [[The created item or $NULL upon failure.]]
158 params { 115 params {
159 @in icon: Evas.Object * @optional; /*@ The icon object to use for the left side of the item. An 116 @in icon: Evas.Object * @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
160 icon can be any Evas object, but usually it is an icon created 117 @in label: const(char)* @optional; [[The label of the item. Note that, NULL is different from empty string "".]]
161 with elm_icon_add(). */
162 @in label: const(char)* @optional; /*@ The label of the item.
163 Note that, NULL is different from empty string "". */
164 } 118 }
165 } 119 }
166 item_icon_get @const { 120 item_icon_get @const {
167 /*@ 121 [[Get the icon associated to the item.
168 Get the icon associated to the item.
169
170 @return The left side icon associated to the item at $index.
171
172 The return value is a pointer to the icon associated to the item when
173 it was created, with function elm_segment_control_item_add(), or later
174 with function elm_object_item_part_content_set(). If no icon
175 was passed as argument, it will return $NULL.
176
177 @see elm_segment_control_item_add()
178 @see elm_object_item_part_content_set()
179 122
180 @ingroup SegmentControl */ 123 The return value is a pointer to the icon associated to the item when
181 return: Evas.Object *; 124 it was created, with function elm_segment_control_item_add(), or later
125 with function elm_object_item_part_content_set(). If no icon
126 was passed as argument, it will return $NULL.]]
127 return: Evas.Object *; [[The left side icon associated to the item at $index.]]
182 params { 128 params {
183 @in idx: int; /*@ The index of the segment item. */ 129 @in idx: int; [[The index of the segment item.]]
184 } 130 }
185 } 131 }
186 } 132 }