Page MenuHomePhabricator

enum Efl.Ui.Dir
Closed, ResolvedPublic


enum @beta Efl.Ui.Dir
   [[Direction for UI objects and layouts.

     Not to be confused with @Efl.Orient which is for images and canvases. This
     enum is used to define how widgets should expand and orient themselves,
     not to rotate images.

     See also @Efl.Ui.Direction.
   default = 0,[[Default direction. Each widget may have a different default.]]
   horizontal, [[Horizontal direction, along the X axis. Usually left-to-right,
                 but may be inverted to right-to-left if mirroring is on.]]
   vertical,   [[Vertical direction, along the Y axis. Usually downwards.]]
   ltr,        [[Horizontal, left-to-right direction.]]
   rtl,        [[Horizontal, right-to-left direction.]]
   down,       [[Vertical, top-to-bottom direction.]]
   up,         [[Vertical, bottom-to-top direction.]]
   right = Efl.Ui.Dir.ltr, [[Right is an alias for LTR.]]
   left = Efl.Ui.Dir.rtl, [[Left is an alias for RTL.]]

Related Objects

segfaultxavi triaged this task as TODO priority.

I see nothing wrong with this one. I considered renaming it to Efl.Ui.Direction (after renaming that one in D8898) but I do not think it's worth the hassle, and everybody understands what Dir means.

segfaultxavi moved this task from Backlog to Evaluating on the efl: api board.May 15 2019, 4:28 AM

To add more information:
The only current users of Efl.Ui.Direction are Spin_Button, Slider(T7893), Panes, Grid(T7870), Table(T7899), Box(T7859) and Progressbar.
All of these are only concerned with the Horizontal or Vertical configurations except Progressbar, which accepts reversed directions.

Therefore, it seems sensible change this interface (and the enum) to be simply a Horizontal / Vertical selector.

On top of those, Flip also uses the Efl.Ui.Dir enum.

zmike added a comment.May 31 2019, 6:21 AM

This seems good.

zmike moved this task from Evaluating to Stabilized on the efl: api board.Jun 12 2019, 5:57 AM