Circle Object
This feature is supported in wearable applications only.
A circle object extends elementary components in a form of circular design. Sometimes, a circle object merely provides additional UI features to elementary component, and sometimes it works as an independent component with UI and functionalities.
Creating a Circle Object
Use the eext_circle_object_add() function to create a circle object.
When creating a circle object, you can choose whether the circle object is rendered by itself or by the circle surface. If the circle surface is passed as a parameter, a circle object connected with circle surface is created, and it is rendered by the circle surface.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface);
When NULL is passed as a surface parameter, the new circle object is managed and rendered by itself. In the following example, a circle object without a circle surface is created and showed in a size of 360 x 360.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, NULL); evas_object_size_hint_min_set(circle_obj, 360, 360); evas_object_show(circle_obj);
Setting the Line Width
To set the line width:
-
Set the line width of the circle object with the eext_circle_object_line_width_set() function.
In the following example, a circle object with a surface is created and its line width set to 20. You can get the current line width of a circle object with the eext_circle_object_line_width_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_line_width_set(circle_obj, 20);
-
Set the line width of a certain item in a circle object with the eext_circle_object_item_line_width_set() function.
If the name of the item is passed as default, it works the same way as the eext_circle_object_line_width_set() function. Similar to the above example, a circle object with a surface is created and its line width is set to 20. You can get the current line width of the item with the eext_circle_object_item_line_width_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_line_width_set(circle_obj, "default", 20);
Setting the Angle
To set the angle:
-
Set the angle of the circle object with the eext_circle_object_angle_set() function.
In the following example, a circle object with surface is created and its angle set to a 45.0 degree angle. You can get the current angle of a circle object with the eext_circle_object_angle_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_angle_set(circle_obj, 45.0);
-
Set the angle of a certain item in a circle object with the eext_circle_object_item_angle_set() function.
If the name of the item is passed as default, it works the same way as eext_circle_object_angle_set() function. Similar to the above example, a circle object with surface is created and its angle is set to a 45.0 degree angle. You can get the current angle of the item with the eext_circle_object_item_angle_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_angle_set(circle_obj, "default", 45.0);
Setting the Angle Offset
To set the angle offset:
-
Set the angle offset of the circle object with the eext_circle_object_angle_offset_set() function.
In the following example, a circle object with a 45.0 degree angle is created and its angle offset set to 30.0 degrees. As a result, the circle object has an arch of 45.0 degree angle line starting from 30.0 degrees to 75.0 degrees. You can get the current angle offset of a circle object with the eext_circle_object_angle_offset_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_angle_set(circle_obj, 45.0); eext_circle_object_angle_offset_set(circle_obj, 30.0);
-
Set the angle offset of a certain item in a circle object with the eext_circle_object_item_angle_offset_set() function.
If the name of the item is passed as default, it works the same way as eext_circle_object_angle_offset_set() function. The following code works the same way as in the above example. You can get the current angle of the item with the eext_circle_object_item_angle_offset_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_angle_set(circle_obj, "default", 45.0); eext_circle_object_item_angle_offset_set(circle_obj, "default", 30.0);
Setting the Minimum and Maximum Angle
To set the minimum and maximum angle:
-
Set the minimum and maximum angle of the circle object with the eext_circle_object_angle_min_max_set() function.
In the following example, a circle object with a surface is created and its minimum angle set to 0.0 degrees and maximum angle to 90.0 degrees. You can get the current minimum and maximum angle of the circle object with the eext_circle_object_angle_min_max_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_angle_min_max_set(circle_obj, 0.0, 90.0);
-
Set the minimum and maximum angles of a certain item in a circle object with the eext_circle_object_item_angle_min_max_set() function.
If the name of the item is passed as default, it works the same way as the eext_circle_object_angle_min_max_set() function. Similar to the above example, a circle object with a minimum and maximum angles of 0.0 and 90.0 is created. You can get the current minimum and maximum angle of the item with the eext_circle_object_item_angle_min_max_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_angle_min_max_set(circle_obj, "default", 0.0, 90.0);
Setting the Minimum and Maximum Value
To set the maximum and minimum value:
-
Set the minimum and maximum values of the circle object with the eext_circle_object_value_min_max_set() function.
In the following example, a circle object with a surface is created and its minimum value is set to 0.0 degrees and maximum value to 10.0 degrees. You can get the current minimum and maximum value of the circle object with the eext_circle_object_value_min_max_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_value_min_max_set(circle_obj, 0.0, 10.0);
-
Set the value of a certain item in a circle object with the eext_circle_object_item_angle_min_max_set() function.
If the name of the item is passed as default, it works the same way as the eext_circle_object_value_min_max_set() function. Similar to the above example, a circle object with a minimum and maximum value of 0.0 to 10.0 degrees is created. You can get the current minimum and maximum values of the item with the eext_circle_object_item_value_min_max_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_value_min_max_set(circle_obj, "default", 0.0, 10.0);
Setting the Value
To set the value:
Note |
---|
The value cannot be lower than the minimum value or higher than the maximum value. |
-
Set the value of the circle object with the eext_circle_object_value_set() function.
In the following example, a circle object with a surface is created and its value set to 5.0. You can get the current value of the circle object with the eext_circle_object_value_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_value_set(circle_obj, 5.0);
-
Set the value of a certain item in a circle object with the eext_circle_object_item_value_set() function.
If the name of the item is passed as default, it works the same as the eext_circle_object_value_set() function. Similar to the above example, a circle object with a surface is created and its value is set to 5.0 degree angle. You can get the current value of the item with the eext_circle_object_item_value_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_value_set(circle_obj, "default", 5.0);
Setting the Color
To set the color:
-
Set the color of the circle object with the eext_circle_object_color_set() function.
To set the color, red, green, blue, and alpha values in range from 0 to 255 must be passed. In the following example, a circle object with a surface is created and its color set to blue. You can get the current color of circle object with the eext_circle_object_color_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_color_set(circle_obj, 255, 0, 0, 255);
-
Set the color of a certain item in a circle object with the eext_circle_object_item_color_set() function.
If the name of the item is passed as default, it works the same way as the eext_circle_object_color_set() function. Similar to the above example, a circle object with a surface is created and its color is set to red. You can get the current color of the item with the eext_circle_object_item_color_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_value_set(circle_obj, "default", 255, 0, 0, 255);
Setting the Radius
To set the radius:
-
Set the radius of the circle object with the eext_circle_object_radius_set() function.
In the following example, a circle object with radius of 50.0 is created. You can get the current radius of the circle object with the eext_circle_object_radius_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_radius_set(circle_obj, 50.0);
-
Set the radius of a certain item in a circle object with the eext_circle_object_item_radius_set() function.
If the name of the item is passed as default, it works the same way as the eext_circle_object_radius_set() function. Similar to the above example, a circle object with a radius of 50.0 is created. You can get the current radius of the item with the eext_circle_object_item_radius_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_item_radius_set(circle_obj, "default", 50.0);
Disabling a Circle Object
Disable the circle object with the eext_circle_object_disabled_set() function.
In the following example, a circle object is disabled. You can get the current disabled status of circle object with the eext_circle_object_disabled_get() function.
Evas_Object *circle_obj; circle_obj = eext_circle_object_add(parent, surface); eext_circle_object_disabled_set(circle_obj, EINA_TRUE);
Enable a disabled circle object with the eext_circle_object_disabled_set() function with the EINA_FALSE parameter:
eext_circle_object_disabled_set(circle_obj, EINA_FALSE);