elementary merging.
[framework/uifw/elementary.git] / src / lib / elm_panel.h
1 /**
2  * @defgroup Panel Panel
3  *
4  * @image html img/widget/panel/preview-00.png
5  * @image latex img/widget/panel/preview-00.eps
6  *
7  * @brief A panel is a type of animated container that contains subobjects.
8  * It can be expanded or contracted by clicking the button on it's edge.
9  *
10  * Orientations are as follows:
11  * @li ELM_PANEL_ORIENT_TOP
12  * @li ELM_PANEL_ORIENT_LEFT
13  * @li ELM_PANEL_ORIENT_RIGHT
14  *
15  * Default content parts of the panel widget that you can use for are:
16  * @li "default" - A content of the panel
17  *
18  * Supported elm_object common APIs.
19  * @li elm_object_signal_emit
20  * @li elm_object_signal_callback_add
21  * @li elm_object_signal_callback_del
22  * @li elm_object_part_content_set
23  * @li elm_object_part_content_get
24  * @li elm_object_part_content_unset
25  *
26  * @ref tutorial_panel shows one way to use this widget.
27  * @{
28  */
29 typedef enum
30 {
31    ELM_PANEL_ORIENT_TOP, /**< Panel (dis)appears from the top */
32    ELM_PANEL_ORIENT_BOTTOM, /**< Not implemented */
33    ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */
34    ELM_PANEL_ORIENT_RIGHT, /**< Panel (dis)appears from the right */
35 } Elm_Panel_Orient;
36
37 /**
38  * @brief Adds a panel object
39  *
40  * @param parent The parent object
41  *
42  * @return The panel object, or NULL on failure
43  */
44 EAPI Evas_Object                 *elm_panel_add(Evas_Object *parent);
45
46 /**
47  * @brief Sets the orientation of the panel
48  *
49  * @param obj The panel object
50  * @param orient The panel orientation. Can be one of the following:
51  * @li ELM_PANEL_ORIENT_TOP
52  * @li ELM_PANEL_ORIENT_LEFT
53  * @li ELM_PANEL_ORIENT_RIGHT
54  *
55  * Sets from where the panel will (dis)appear.
56  */
57 EAPI void                         elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
58
59 /**
60  * @brief Get the orientation of the panel.
61  *
62  * @param obj The panel object
63  * @return The Elm_Panel_Orient, or ELM_PANEL_ORIENT_LEFT on failure.
64  */
65 EAPI Elm_Panel_Orient             elm_panel_orient_get(const Evas_Object *obj);
66
67 /**
68  * @brief Set the state of the panel.
69  *
70  * @param obj The panel object
71  * @param hidden If true, the panel will run the animation to disappear.
72  */
73 EAPI void                         elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden);
74
75 /**
76  * @brief Get the state of the panel.
77  *
78  * @param obj The panel object
79  * @return EINA_TRUE if it is hidden state
80  */
81 EAPI Eina_Bool                    elm_panel_hidden_get(const Evas_Object *obj);
82
83 /**
84  * @brief Toggle the hidden state of the panel from code
85  *
86  * @param obj The panel object
87  */
88 EAPI void                         elm_panel_toggle(Evas_Object *obj);
89
90 /**
91  * @brief Set the content of the panel.
92  *
93  * @param obj The panel object
94  * @param content The content object
95  */
96 EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content);
97
98 /**
99  * @brief Get the content of the panel.
100  *
101  * @param obj The panel object
102  * @return The content object of the panel or NULL if none is set.
103  *
104  * @see elm_panel_content_set()
105  */
106 EAPI Evas_Object * elm_panel_content_get(const Evas_Object *obj);
107
108 /**
109  * @brief Remove and return the content from the panel.
110  *
111  * @param obj The panel object
112  * @return The content object of the panel or NULL if none is set.
113  */
114 EAPI Evas_Object * elm_panel_content_unset(Evas_Object *obj);
115
116 /**
117  * @}
118  */