break;
case INDEX_HORIZONTAL:
- elm_index_horizontal_set(d->id, EINA_TRUE);
+ efl_orientation_set(d->id, EFL_ORIENT_HORIZONTAL);
break;
case INDEX_INDICATOR_DISABLED:
evas_object_show(list);
api->dt.id = id = elm_index_add(win);
- elm_index_horizontal_set(id, EINA_TRUE);
+ efl_orientation_set(id, EFL_ORIENT_HORIZONTAL);
evas_object_size_hint_weight_set(id, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(id, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tb, id, 0, 0, 1, 1);
void *data)
{
Elm_Index_Data *sd = data;
+ Eina_Bool horizontal;
- _els_box_layout(o, priv, sd->horizontal, EINA_TRUE, EINA_FALSE);
+ if (sd->orientation == EFL_ORIENT_HORIZONTAL)
+ horizontal = EINA_TRUE;
+ else
+ horizontal = EINA_FALSE;
+
+ _els_box_layout(o, priv, horizontal, EINA_TRUE, EINA_FALSE);
}
static void
edje_object_mirrored_set(VIEW(it), rtl);
o = VIEW(it);
- if (sd->horizontal)
+ if (sd->orientation == EFL_ORIENT_HORIZONTAL)
{
if (i & 0x1)
elm_widget_theme_object_set
_index_box_clear(obj, 0);
_index_box_clear(obj, 1);
- if (sd->horizontal)
+ if (sd->orientation == EFL_ORIENT_HORIZONTAL)
eina_stringshare_replace(&ld->group, "base/horizontal");
else
eina_stringshare_replace(&ld->group, "base/vertical");
x = (x * x) + (y * y);
if ((x < dist) || (!it_closest))
{
- if (sd->horizontal)
+ if (sd->orientation == EFL_ORIENT_HORIZONTAL)
cdv = (double)(xx - bx) / (double)bw;
else
cdv = (double)(yy - by) / (double)bh;
(wd->resize_obj, "elm.dragable.pointer",
(!edje_object_mirrored_get(wd->resize_obj)) ?
x : (x - w), y);
- if (!sd->horizontal)
+ if (sd->orientation == EFL_ORIENT_VERTICAL)
{
if (adx > minw)
{
return obj;
}
+EAPI void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
+{
+ Efl_Orient orient;
+
+ if (horizontal)
+ orient = EFL_ORIENT_HORIZONTAL;
+ else
+ orient = EFL_ORIENT_VERTICAL;
+
+ efl_orientation_set(obj, orient);
+}
+
+EAPI Eina_Bool elm_index_horizontal_get(const Evas_Object *obj)
+{
+ Efl_Orient orient = efl_orientation_get(obj);
+
+ if (orient == EFL_ORIENT_HORIZONTAL)
+ return EINA_TRUE;
+
+ return EINA_FALSE;
+}
+
EOLIAN static Eo *
_elm_index_eo_base_constructor(Eo *obj, Elm_Index_Data *_pd EINA_UNUSED)
{
}
EOLIAN static void
-_elm_index_horizontal_set(Eo *obj, Elm_Index_Data *sd, Eina_Bool horizontal)
+_elm_index_efl_orientation_orientation_set(Eo *obj, Elm_Index_Data *sd, Efl_Orient dir)
{
- horizontal = !!horizontal;
- if (horizontal == sd->horizontal) return;
+ if ((dir != EFL_ORIENT_HORIZONTAL) && (dir != EFL_ORIENT_VERTICAL))
+ return;
+
+ sd->orientation = dir;
- sd->horizontal = horizontal;
elm_obj_widget_theme_apply(obj);
}
-EOLIAN static Eina_Bool
-_elm_index_horizontal_get(Eo *obj EINA_UNUSED, Elm_Index_Data *sd)
+EOLIAN static Efl_Orient
+_elm_index_efl_orientation_orientation_get(Eo *obj, Elm_Index_Data *sd)
{
- return sd->horizontal;
+ return sd->orientation;
}
EOLIAN static void
EOLIAN static void
_elm_index_omit_enabled_set(Eo *obj, Elm_Index_Data *sd, Eina_Bool enabled)
{
- if (sd->horizontal) return;
+ if (sd->orientation == EFL_ORIENT_HORIZONTAL) return;
enabled = !!enabled;
if (sd->omit_enabled == enabled) return;
-class Elm.Index (Elm.Layout, Evas.Clickable_Interface, Evas.Selectable_Interface)
+class Elm.Index (Elm.Layout, Efl.Orientation,
+ Evas.Clickable_Interface, Evas.Selectable_Interface)
{
legacy_prefix: elm_index;
eo_prefix: elm_obj_index;
priority: int; [[$priority target priority value in index]]
}
}
-
- @property horizontal {
- [[Enable or disable horizontal mode on the index object
-
- Note: Vertical mode is set by default.
-
- On horizontal mode items are displayed on index from left to right,
- instead of from top to bottom. Also, the index will scroll horizontally.]]
- set {
- }
- get {
- }
- values {
- horizontal: bool; [[$true to enable horizontal or $false to
- disable it, i.e., to enable vertical mode. it's an area one Fingers
- "finger" wide on the bottom side of the index widget's container.]]
- }
- }
@property delay_change_time {
[[Set a delay change time for index object.
Elm.Widget.focus_direction_manager_is;
Elm.Widget.access;
Elm.Widget.focus_next;
+ Efl.Orientation.orientation;
Elm.Layout.sizing_eval;
Elm.Interface.Atspi_Accessible.children.get;
}
*/
EAPI Evas_Object *elm_index_add(Evas_Object *parent);
+/**
+ * @brief Enable or disable horizontal mode on the index object
+ *
+ * @note Vertical mode is set by default.
+ *
+ * On horizontal mode items are displayed on index from left to right, instead
+ * of from top to bottom. Also, the index will scroll horizontally.
+ *
+ * @param[in] horizontal @c true to enable horizontal or @c false to disable
+ * it, i.e., to enable vertical mode. it's an area one Fingers "finger" wide on
+ * the bottom side of the index widget's container.
+ *
+ * @ingroup Elm_Index
+ */
+EAPI void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
+
+/**
+ * @brief Get enable or disable status of horizontal mode on the index object.
+ *
+ * @note Vertical mode is set by default.
+ *
+ * Returns the current status of horizontal mode on index object.
+ * On horizontal mode items are displayed on index from left to right, instead
+ * of from top to bottom. Also, the index will scroll horizontally.
+ *
+ * @return Current status of horizontal mode on index object.
+ * @c true if horizontal mode is enabled or @c false if disabled.
+ *
+ * @ingroup Elm_Index
+ */
+EAPI Eina_Bool elm_index_horizontal_get(const Evas_Object *obj);
+
#include "elm_index_item.eo.legacy.h"
#include "elm_index.eo.legacy.h"
* small */
Eina_List *omit;
+ Efl_Orient orientation;
int level;
Evas_Coord dx, dy;
Ecore_Timer *delay;
int show_group, next_group;
Eina_Bool mouse_down : 1;
- Eina_Bool horizontal : 1;
Eina_Bool autohide_disabled : 1;
Eina_Bool indicator_disabled : 1;
Eina_Bool omit_enabled : 1;