blob: 9f97ec1a47c273f48b2f9f335eef9379200e5881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/**
* @defgroup Bubble Bubble
* @ingroup Elementary
*
* @image html img/widget/bubble/preview-00.png
* @image latex img/widget/bubble/preview-00.eps
* @image html img/widget/bubble/preview-01.png
* @image latex img/widget/bubble/preview-01.eps
* @image html img/widget/bubble/preview-02.png
* @image latex img/widget/bubble/preview-02.eps
*
* @brief The Bubble is a widget to show text similar to how speech is
* represented in comics.
*
* The bubble widget contains 5 important visual elements:
* @li The frame is a rectangle with rounded edjes and an "arrow".
* @li The @p icon is an image to which the frame's arrow points to.
* @li The @p label is a text which appears to the right of the icon if the
* corner is "top_left" or "bottom_left" and is right aligned to the frame
* otherwise.
* @li The @p info is a text which appears to the right of the label. Info's
* font is of a lighter color than label.
* @li The @p content is an evas object that is shown inside the frame.
*
* The position of the arrow, icon, label and info depends on which corner is
* selected. The four available corners are:
* @li "top_left" - Default
* @li "top_right"
* @li "bottom_left"
* @li "bottom_right"
*
* Signals that you can add callbacks for are:
* @li "clicked" - This is called when a user has clicked the bubble.
*
* Default content parts of the bubble that you can use for are:
* @li "default" - A content of the bubble
* @li "icon" - An icon of the bubble
*
* Default text parts of the button widget that you can use for are:
* @li "default" - Label of the bubble
* @li "info" - info of the bubble
*
* Supported elm_object common APIs.
* @li @ref elm_object_part_text_set
* @li @ref elm_object_part_text_get
* @li @ref elm_object_part_content_set
* @li @ref elm_object_part_content_get
* @li @ref elm_object_part_content_unset
*
* For an example of using a bubble see @ref bubble_01_example_page "this".
*
* @{
*/
/**
* Defines the corner values for a bubble.
*
* The corner will be used to determine where the arrow of the
* bubble points to.
*/
typedef enum
{
ELM_BUBBLE_POS_INVALID = -1,
ELM_BUBBLE_POS_TOP_LEFT,
ELM_BUBBLE_POS_TOP_RIGHT,
ELM_BUBBLE_POS_BOTTOM_LEFT,
ELM_BUBBLE_POS_BOTTOM_RIGHT,
} Elm_Bubble_Pos;
/**
* Add a new bubble to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* This function adds a text bubble to the given parent evas object.
*
* @ingroup Bubble
*/
EAPI Evas_Object *elm_bubble_add(Evas_Object *parent);
/**
* Set the corner of the bubble
*
* @param obj The bubble object.
* @param pos The given corner for the bubble.
*
* This function sets the corner of the bubble. The corner will be used to
* determine where the arrow in the frame points to and where label, icon and
* info are shown.
*
*
* @ingroup Bubble
*/
EAPI void elm_bubble_pos_set(Evas_Object *obj, Elm_Bubble_Pos pos);
/**
* Get the corner of the bubble
*
* @param obj The bubble object.
* @return The given corner for the bubble.
*
* This function gets the selected corner of the bubble.
*
* @ingroup Bubble
*/
EAPI Elm_Bubble_Pos elm_bubble_pos_get(const Evas_Object *obj);
/**
* @}
*/
|