aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/elementary/src/lib/elm_radio.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-04-22 09:20:32 +1000
committerDavid Walter Seikel2012-04-22 09:20:32 +1000
commit3ad3455551be0d7859ecb02290376206d5e66498 (patch)
tree497917e12b4d7f458dff9765d9b53f64c4e03fc3 /libraries/elementary/src/lib/elm_radio.h
parentUpdate EFL to latest beta. (diff)
downloadSledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.zip
SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.gz
SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.bz2
SledjHamr-3ad3455551be0d7859ecb02290376206d5e66498.tar.xz
And actually include new files, plus elementary libraries.
Diffstat (limited to '')
-rw-r--r--libraries/elementary/src/lib/elm_radio.h159
1 files changed, 159 insertions, 0 deletions
diff --git a/libraries/elementary/src/lib/elm_radio.h b/libraries/elementary/src/lib/elm_radio.h
new file mode 100644
index 0000000..388e720
--- /dev/null
+++ b/libraries/elementary/src/lib/elm_radio.h
@@ -0,0 +1,159 @@
1/**
2 * @defgroup Radio Radio
3 * @ingroup Elementary
4 *
5 * @image html img/widget/radio/preview-00.png
6 * @image latex img/widget/radio/preview-00.eps
7 *
8 * @brief Radio is a widget that allows for 1 or more options to be displayed
9 * and have the user choose only 1 of them.
10 *
11 * A radio object contains an indicator, an optional Label and an optional
12 * icon object. While it's possible to have a group of only one radio they,
13 * are normally used in groups of 2 or more.
14 *
15 * elm_radio objects are grouped in a slightly different, compared to other
16 * UI toolkits. There is no seperate group name/id to remember or manage.
17 * The members represent the group, there are the group. To make a group,
18 * use elm_radio_group_add() and pass existing radio object and the new radio
19 * object.
20 *
21 * The radio object(s) will select from one of a set
22 * of integer values, so any value they are configuring needs to be mapped to
23 * a set of integers. To configure what value that radio object represents,
24 * use elm_radio_state_value_set() to set the integer it represents. To set
25 * the value the whole group(which one is currently selected) is to indicate
26 * use elm_radio_value_set() on any group member, and to get the groups value
27 * use elm_radio_value_get(). For convenience the radio objects are also able
28 * to directly set an integer(int) to the value that is selected. To specify
29 * the pointer to this integer to modify, use elm_radio_value_pointer_set().
30 * The radio objects will modify this directly. That implies the pointer must
31 * point to valid memory for as long as the radio objects exist.
32 *
33 * Signals that you can add callbacks for are:
34 * @li changed - This is called whenever the user changes the state of one of
35 * the radio objects within the group of radio objects that work together.
36 *
37 * Default text parts of the radio widget that you can use for are:
38 * @li "default" - Label of the radio
39 *
40 * Default content parts of the radio widget that you can use for are:
41 * @li "icon" - An icon of the radio
42 *
43 * Supported elm_object common APIs.
44 * @li @ref elm_object_part_text_set
45 * @li @ref elm_object_part_text_get
46 * @li @ref elm_object_part_content_set
47 * @li @ref elm_object_part_content_get
48 * @li @ref elm_object_part_content_unset
49 * @li @ref elm_object_disabled_set
50 * @li @ref elm_object_disabled_get
51 *
52 * @ref tutorial_radio show most of this API in action.
53 * @{
54 */
55
56/**
57 * @brief Add a new radio to the parent
58 *
59 * @param parent The parent object
60 * @return The new object or NULL if it cannot be created
61 *
62 * @ingroup Radio
63 */
64EAPI Evas_Object *elm_radio_add(Evas_Object *parent);
65
66/**
67 * @brief Add this radio to a group of other radio objects
68 *
69 * @param obj The radio object
70 * @param group Any object whose group the @p obj is to join.
71 *
72 * Radio objects work in groups. Each member should have a different integer
73 * value assigned. In order to have them work as a group, they need to know
74 * about each other. This adds the given radio object to the group of which
75 * the group object indicated is a member.
76 *
77 * @ingroup Radio
78 */
79EAPI void elm_radio_group_add(Evas_Object *obj, Evas_Object *group);
80
81/**
82 * @brief Set the integer value that this radio object represents
83 *
84 * @param obj The radio object
85 * @param value The value to use if this radio object is selected
86 *
87 * This sets the value of the radio.
88 *
89 * @ingroup Radio
90 */
91EAPI void elm_radio_state_value_set(Evas_Object *obj, int value);
92
93/**
94 * @brief Get the integer value that this radio object represents
95 *
96 * @param obj The radio object
97 * @return The value used if this radio object is selected
98 *
99 * This gets the value of the radio.
100 * @see elm_radio_value_set()
101 *
102 * @ingroup Radio
103 */
104EAPI int elm_radio_state_value_get(const Evas_Object *obj);
105
106/**
107 * @brief Set the value of the radio group.
108 *
109 * @param obj The radio object (any radio object of the group).
110 * @param value The value to use for the group
111 *
112 * This sets the value of the radio group and will also set the value if
113 * pointed to, to the value supplied, but will not call any callbacks.
114 *
115 * @ingroup Radio
116 */
117EAPI void elm_radio_value_set(Evas_Object *obj, int value);
118
119/**
120 * @brief Get the value of the radio group
121 *
122 * @param obj The radio object (any radio object of the group).
123 * @return The integer state
124 *
125 * @ingroup Radio
126 */
127EAPI int elm_radio_value_get(const Evas_Object *obj);
128
129/**
130 * @brief Set a convenience pointer to a integer to change when radio group
131 * value changes.
132 *
133 * @param obj The radio object (any object of a group)
134 * @param valuep Pointer to the integer to modify
135 *
136 * This sets a pointer to a integer, that, in addition to the radio objects
137 * state will also be modified directly. To stop setting the object pointed
138 * to simply use NULL as the @p valuep argument. If valuep is not NULL, then
139 * when this is called, the radio objects state will also be modified to
140 * reflect the value of the integer valuep points to, just like calling
141 * elm_radio_value_set().
142 *
143 * @ingroup Radio
144 */
145EAPI void elm_radio_value_pointer_set(Evas_Object *obj, int *valuep);
146
147/**
148 * @brief Get the selected radio object.
149 *
150 * @param obj Any radio object (any object of a group)
151 * @return The selected radio object
152 *
153 * @ingroup Radio
154 */
155EAPI Evas_Object *elm_radio_selected_object_get(Evas_Object *obj);
156
157/**
158 * @}
159 */