elementary/frame - api review updated.
[framework/uifw/elementary.git] / src / lib / elm_frame.h
1 /**
2  * @defgroup Frame Frame
3  *
4  * @image html img/widget/frame/preview-00.png
5  * @image latex img/widget/frame/preview-00.eps
6  *
7  * @brief Frame is a widget that holds some content and has a title.
8  *
9  * The default look is a frame with a title, but Frame supports multiple
10  * styles:
11  * @li default
12  * @li pad_small
13  * @li pad_medium
14  * @li pad_large
15  * @li pad_huge
16  * @li outdent_top
17  * @li outdent_bottom
18  *
19  * Of all this styles only default shows the title.
20  *
21  * Smart callbacks one can listen to:
22  * - @c "clicked" - The user has clicked the frame's label
23  *
24  * Default contents parts of the frame widget that you can use for are:
25  * @li "default" - A content of the frame
26  *
27  * Default text parts of the frame widget that you can use for are:
28  * @li "default" - Label of the frame
29  *
30  * Supported elm_object common APIs.
31  * @li elm_object_part_text_set
32  * @li elm_object_part_text_get
33  * @li elm_object_part_content_set
34  * @li elm_object_part_content_get
35  * @li elm_object_part_content_unset
36  *
37  * For a detailed example see the @ref tutorial_frame.
38  *
39  * @{
40  */
41
42 /**
43  * @brief Add a new frame to the parent
44  *
45  * @param parent The parent object
46  * @return The new object or NULL if it cannot be created
47  */
48 EAPI Evas_Object                 *elm_frame_add(Evas_Object *parent);
49
50 /**
51  * @brief Toggle autocollapsing of a frame
52  * @param obj The frame
53  * @param autocollapse Whether to enable autocollapse
54  *
55  * When @p enable is EINA_TRUE, clicking a frame's label will collapse the frame
56  * vertically, shrinking it to the height of the label.
57  * By default, this is DISABLED.
58  */
59 //XXX: really need to provide this API?
60 //XXX: How about elm_frame_autofold_set() ?
61 EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse);
62
63 /**
64  * @brief Determine autocollapsing of a frame
65  * @param obj The frame
66  * @return Whether autocollapse is enabled
67  *
68  * When this returns EINA_TRUE, clicking a frame's label will collapse the frame
69  * vertically, shrinking it to the height of the label.
70  * By default, this is DISABLED.
71  */
72 //XXX: ... really need to provide this API?
73 //XXX: How about elm_frame_autofold_get() ?
74 EAPI Eina_Bool elm_frame_autocollapse_get(const Evas_Object *obj);
75
76 /**
77  * @brief Manually collapse a frame without animations
78  * @param obj The frame
79  * @param collapse true to collapse, false to expand
80  *
81  * Use this to toggle the collapsed state of a frame, bypassing animations.
82  */
83 //XXX: How about elm_frame_fold_set() ?
84 EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse);
85
86 /**
87  * @brief Manually collapse a frame with animations
88  * @param obj The frame
89  * @param collapse true to collapse, false to expand
90  *
91  * Use this to toggle the collapsed state of a frame, triggering animations.
92  */
93 //XXX: ... really need to provide this API?
94 //XXX: How about elm_frame_fold_transition_go()?
95 EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse);
96
97 /**
98  * @brief Determine the collapse state of a frame
99  * @param obj The frame
100  * @return true if collapsed, false otherwise
101  *
102  * Use this to determine the collapse state of a frame.
103  */
104 //XXX: ... How about elm_frame_fold_get() ?
105 EAPI Eina_Bool elm_frame_collapse_get(const Evas_Object *obj);
106 /**
107  * @}
108  */