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