2 * @defgroup Panel Panel
5 * @image html panel_inheritance_tree.png
6 * @image latex panel_inheritance_tree.eps
8 * @image html img/widget/panel/preview-00.png
9 * @image latex img/widget/panel/preview-00.eps
11 * @brief A panel is an animated side-panel that contains a
12 * sub-object. It can be expanded or contracted by clicking the
15 * Orientations are as follows:
16 * @li @c ELM_PANEL_ORIENT_TOP
17 * @li @c ELM_PANEL_ORIENT_LEFT
18 * @li @c ELM_PANEL_ORIENT_RIGHT
19 * @li @c ELM_PANEL_ORIENT_BOTTOM
21 * This widget inherits from the @ref Layout one, so that all the
22 * functions acting on it also work for panel objects (@since 1.8).
24 * Default content parts of the panel widget that you can use are:
25 * @li @c "default" - A content of the panel
27 * This widget emits the following signals, besides the ones sent from
28 * @li @c "scroll" - the content has been scrolled (moved)
30 * @ref tutorial_panel shows one way to use this widget.
35 ELM_PANEL_ORIENT_TOP, /**< Panel (dis)appears from the top */
36 ELM_PANEL_ORIENT_BOTTOM, /**< Panel (dis)appears from the bottom */
37 ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */
38 ELM_PANEL_ORIENT_RIGHT, /**< Panel (dis)appears from the right */
42 * @typedef Elm_Panel_Scroll_Info
44 * When panel content is scrolled, if the panel object is scrollable,
45 * This information will be passed by the @c event_info argument in the
46 * @c "scroll" smart callback function.
48 typedef struct _Elm_Panel_Scroll_Info
50 double rel_x; /** <content scrolled position (0.0 ~ 1.0) in the panel */
51 double rel_y; /** <content scrolled position (0.0 ~ 1.0) in the panel */
53 } Elm_Panel_Scroll_Info;
56 * @brief Adds a panel object
58 * @param parent The parent object
60 * @return The panel object, or NULL on failure
64 EAPI Evas_Object *elm_panel_add(Evas_Object *parent);
67 * @brief Sets the orientation of the panel
69 * @param obj The panel object
70 * @param orient The panel orientation. Can be one of the following:
71 * @li ELM_PANEL_ORIENT_TOP
72 * @li ELM_PANEL_ORIENT_LEFT
73 * @li ELM_PANEL_ORIENT_RIGHT
75 * Sets from where the panel will (dis)appear.
79 EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
82 * @brief Get the orientation of the panel.
84 * @param obj The panel object
85 * @return The Elm_Panel_Orient, or ELM_PANEL_ORIENT_LEFT on failure.
89 EAPI Elm_Panel_Orient elm_panel_orient_get(const Evas_Object *obj);
92 * @brief Set the state of the panel.
94 * @param obj The panel object
95 * @param hidden If true, the panel will run the animation to disappear.
99 EAPI void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden);
102 * @brief Get the state of the panel.
104 * @param obj The panel object
105 * @return EINA_TRUE if it is hidden state
109 EAPI Eina_Bool elm_panel_hidden_get(const Evas_Object *obj);
112 * @brief Toggle the hidden state of the panel from code
114 * @param obj The panel object
118 EAPI void elm_panel_toggle(Evas_Object *obj);
121 * Enable or disable scrolling in panel
123 * Normally the panel is not scrollable unless you enable it with this call.
125 * @param obj The panel object
126 * @param scrollable EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
130 EAPI void elm_panel_scrollable_set(Evas_Object *obj, Eina_Bool scrollable);
133 * Get the scrollable state of the panel
135 * Normally the panel is not scrollable. This gets the scrollable state
138 * @param obj The panel object
139 * @return The scrollable state
141 * @see elm_panel_scrollable_set()
145 EAPI Eina_Bool elm_panel_scrollable_get(const Evas_Object *obj);