40e4e60d9e86f5b2c8b8570c9e50dfc126d0a083
[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 <<<<<<< HEAD
16  * Default contents parts of the panel widget that you can use for are:
17 =======
18  * Default content parts of the panel widget that you can use for are:
19 >>>>>>> remotes/origin/upstream
20  * @li "default" - A content of the panel
21  *
22  * Supported elm_object common APIs.
23  * @li elm_object_signal_emit
24  * @li elm_object_signal_callback_add
25  * @li elm_object_signal_callback_del
26  * @li elm_object_part_content_set
27  * @li elm_object_part_content_get
28  * @li elm_object_part_content_unset
29  *
30  * @ref tutorial_panel shows one way to use this widget.
31  * @{
32  */
33 typedef enum
34 {
35    ELM_PANEL_ORIENT_TOP, /**< Panel (dis)appears from the top */
36    ELM_PANEL_ORIENT_BOTTOM, /**< Not implemented */
37    ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */
38    ELM_PANEL_ORIENT_RIGHT, /**< Panel (dis)appears from the right */
39 } Elm_Panel_Orient;
40
41 /**
42  * @brief Adds a panel object
43  *
44  * @param parent The parent object
45  *
46  * @return The panel object, or NULL on failure
47  */
48 EAPI Evas_Object                 *elm_panel_add(Evas_Object *parent);
49
50 /**
51  * @brief Sets the orientation of the panel
52  *
53 <<<<<<< HEAD
54  * @param parent The parent object
55 =======
56  * @param obj The panel object
57 >>>>>>> remotes/origin/upstream
58  * @param orient The panel orientation. Can be one of the following:
59  * @li ELM_PANEL_ORIENT_TOP
60  * @li ELM_PANEL_ORIENT_LEFT
61  * @li ELM_PANEL_ORIENT_RIGHT
62  *
63  * Sets from where the panel will (dis)appear.
64  */
65 EAPI void                         elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
66
67 /**
68  * @brief Get the orientation of the panel.
69  *
70  * @param obj The panel object
71  * @return The Elm_Panel_Orient, or ELM_PANEL_ORIENT_LEFT on failure.
72  */
73 EAPI Elm_Panel_Orient             elm_panel_orient_get(const Evas_Object *obj);
74
75 /**
76  * @brief Set the state of the panel.
77  *
78  * @param obj The panel object
79 <<<<<<< HEAD
80  * @param hidden If true, the panel will run the animation to contract
81 =======
82  * @param hidden If true, the panel will run the animation to disappear.
83 >>>>>>> remotes/origin/upstream
84  */
85 EAPI void                         elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden);
86
87 /**
88  * @brief Get the state of the panel.
89  *
90  * @param obj The panel object
91 <<<<<<< HEAD
92  * @param hidden If true, the panel is in the "hide" state
93 =======
94  * @return EINA_TRUE if it is hidden state
95 >>>>>>> remotes/origin/upstream
96  */
97 EAPI Eina_Bool                    elm_panel_hidden_get(const Evas_Object *obj);
98
99 /**
100  * @brief Toggle the hidden state of the panel from code
101  *
102  * @param obj The panel object
103  */
104 EAPI void                         elm_panel_toggle(Evas_Object *obj);
105
106 /**
107 <<<<<<< HEAD
108 =======
109  * @brief Set the content of the panel.
110  *
111  * @param obj The panel object
112  * @param content The content object
113  */
114 EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content);
115
116 /**
117  * @brief Get the content of the panel.
118  *
119  * @param obj The panel object
120  * @return The content object of the panel or NULL if none is set.
121  *
122  * @see elm_panel_content_set()
123  */
124 EAPI Evas_Object * elm_panel_content_get(const Evas_Object *obj);
125
126 /**
127  * @brief Remove and return the content from the panel.
128  *
129  * @param obj The panel object
130  * @return The content object of the panel or NULL if none is set.
131  */
132 EAPI Evas_Object * elm_panel_content_unset(Evas_Object *obj);
133
134 /**
135 >>>>>>> remotes/origin/upstream
136  * @}
137  */