2 * @defgroup Panel Panel
3 * @ingroup elm_widget_group
5 * @image html panel_inheritance_tree.png
6 * @image latex panel_inheritance_tree.eps
8 * @brief A panel is an animated side-panel that contains a
9 * sub-object. It can be expanded or contracted by clicking the
12 * Orientations are as follows:
13 * @li @c ELM_PANEL_ORIENT_TOP
14 * @li @c ELM_PANEL_ORIENT_LEFT
15 * @li @c ELM_PANEL_ORIENT_RIGHT
16 * @li @c ELM_PANEL_ORIENT_BOTTOM
18 * This widget inherits from the @ref Layout one, so that all the
19 * functions acting on it also work for panel objects (@since 1.8).
21 * The default content parts of the panel widget that you can use are:
22 * @li @c "default" - Content of the panel.
24 * This widget emits the following signals, besides the ones sent from
25 * @li @c "scroll" - The content has been scrolled (moved).
32 * @brief Enumeration of Elm Panel Orient type
36 ELM_PANEL_ORIENT_TOP, /**< Panel (dis)appears from the top */
37 ELM_PANEL_ORIENT_BOTTOM, /**< Panel (dis)appears from the bottom */
38 ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */
39 ELM_PANEL_ORIENT_RIGHT, /**< Panel (dis)appears from the right */
43 * @typedef Elm_Panel_Scroll_Info
45 * @brief The structure type when the panel content is scrolled, if the panel object is scrollable,
46 * this information is passed by the @a event_info argument in the
47 * @c "scroll" smart callback function.
49 typedef struct _Elm_Panel_Scroll_Info
51 double rel_x; /**< Content scrolled position (0.0 ~ 1.0) in the panel */
52 double rel_y; /**< Content scrolled position (0.0 ~ 1.0) in the panel */
54 } Elm_Panel_Scroll_Info;
57 * @brief Adds a panel object.
61 * @param[in] parent The parent object
63 * @return The panel object, otherwise @c NULL on failure
65 EAPI Evas_Object *elm_panel_add(Evas_Object *parent);
68 * @brief Sets the orientation of the panel.
70 * @details This sets the location from where the panel (dis)appears.
74 * @param[in] obj The panel object
75 * @param[in] orient The panel orientation, can be one of the following:
76 * @li ELM_PANEL_ORIENT_TOP
77 * @li ELM_PANEL_ORIENT_LEFT
78 * @li ELM_PANEL_ORIENT_RIGHT
80 EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
83 * @brief Gets the orientation of the panel.
87 * @param[in] obj The panel object
88 * @return The Elm_Panel_Orient, otherwise @c ELM_PANEL_ORIENT_LEFT on failure
90 EAPI Elm_Panel_Orient elm_panel_orient_get(const Evas_Object *obj);
93 * @brief Sets the state of the panel.
97 * @param[in] obj The panel object
98 * @param[in] hidden If @c true the panel runs the animation to disappear,
101 EAPI void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden);
104 * @brief Gets the state of the panel.
108 * @param[in] obj The panel object
109 * @return @c EINA_TRUE if it is the hidden state,
110 * otherwise @c EINA_FALSE
112 EAPI Eina_Bool elm_panel_hidden_get(const Evas_Object *obj);
115 * @brief Toggles the hidden state of the panel from the code.
119 * @param[in] obj The panel object
121 EAPI void elm_panel_toggle(Evas_Object *obj);
124 * @remarks Tizen only feature but not internal (will be patched into upstream)
126 * @brief Enables or disables scrolling in the panel.
130 * @remarks Normally the panel is not scrollable unless you enable it with this call.
132 * @param[in] obj The panel object
133 * @param[in] scrollable If @c EINA_TRUE it is scrollable, otherwise @c EINA_FALSE
135 EAPI void elm_panel_scrollable_set(Evas_Object *obj, Eina_Bool scrollable);
139 * @remarks Tizen only feature
141 * @brief Gets the scrollable state of the panel.
143 * @remarks Normally the panel is not scrollable. This gets the scrollable state
146 * @param obj The panel object
147 * @return The scrollable state
149 * @see elm_panel_scrollable_set()
151 EAPI Eina_Bool elm_panel_scrollable_get(const Evas_Object *obj);
155 * @remarks Tizen only feature
157 * @brief Set the size of the content of a scrollable panel
159 * @param obj The panel object
160 * @param ratio The ratio of the content to the panel. This value ranges from 0 to 1.
162 EAPI void elm_panel_scrollable_content_size_set(Evas_Object *obj, double ratio);